summaryrefslogtreecommitdiff
path: root/src/backend/utils/error
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1999-01-11 03:56:11 +0000
committerMarc G. Fournier <scrappy@hub.org>1999-01-11 03:56:11 +0000
commit3b3ffc8d97d97067eefea66b8df95fc963d8b0be (patch)
tree54bcaa68bb72373f099d3d222f5b1b8fd0e9626b /src/backend/utils/error
parent6d5d673ca87903e73cc88bfcf9b7ca3266f6aa99 (diff)
downloadpostgresql-3b3ffc8d97d97067eefea66b8df95fc963d8b0be.tar.gz
From: Magnus Hagander <mha@sollentuna.net>
Here is a first patch to cleanup the backend side of libpq. This patch removes all external dependencies on the "Pfin" and "Pfout" that are declared in pqcomm.h. These variables are also changed to "static" to make sure. Almost all the change is in the handler of the "copy" command - most other areas of the backend already used the correct functions. This change will make the way for cleanup of the internal stuff there - now that all the functions accessing the file descriptors are confined to a single directory.
Diffstat (limited to 'src/backend/utils/error')
-rw-r--r--src/backend/utils/error/elog.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index e965cd2ad3..4e68c1e24a 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.36 1999/01/01 04:48:45 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.37 1999/01/11 03:56:07 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -67,11 +67,6 @@ elog(int lev, const char *fmt,...)
extern int errno,
sys_nerr;
-#ifndef PG_STANDALONE
- extern FILE *Pfout;
-
-#endif
-
#ifdef USE_SYSLOG
int log_level;
@@ -190,7 +185,7 @@ elog(int lev, const char *fmt,...)
#ifndef PG_STANDALONE
/* Send IPC message to the front-end program */
- if (Pfout != NULL && lev > DEBUG)
+ if (IsUnderPostmaster && lev > DEBUG)
{
/* notices are not exactly errors, handle it differently */
if (lev == NOTICE)
@@ -201,7 +196,7 @@ elog(int lev, const char *fmt,...)
pq_putstr(line + TIMESTAMP_SIZE); /* don't show timestamps */
pq_flush();
}
- if (Pfout == NULL)
+ if (!IsUnderPostmaster)
{
/*