1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

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.
This commit is contained in:
Marc G. Fournier
1999-01-11 03:56:11 +00:00
parent 6d5d673ca8
commit 3b3ffc8d97
5 changed files with 179 additions and 72 deletions

View File

@ -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)
{
/*