diff options
author | Tom Lane | 2002-03-04 01:46:04 +0000 |
---|---|---|
committer | Tom Lane | 2002-03-04 01:46:04 +0000 |
commit | 36f693ec69bd412817021ae530c729b414822ebc (patch) | |
tree | 903c0ad1bc7baed33d305faefe3b1a1bb48d85c3 /src/backend/libpq/util.c | |
parent | 5ab02fd12321d1d742f1b288fda73af87abdf37c (diff) |
Further work on elog cleanup: fix some bogosities in elog's logic about
when to send what to which, prevent recursion by introducing new COMMERROR
elog level for client-communication problems, get rid of direct writes
to stderr in backend/libpq files, prevent non-error elogs from going to
client during the authentication cycle.
Diffstat (limited to 'src/backend/libpq/util.c')
-rw-r--r-- | src/backend/libpq/util.c | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/src/backend/libpq/util.c b/src/backend/libpq/util.c deleted file mode 100644 index 4ddf17d59bb..00000000000 --- a/src/backend/libpq/util.c +++ /dev/null @@ -1,77 +0,0 @@ -/*------------------------------------------------------------------------- - * - * util.c - * general routines for backend libpq modules - * - * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group - * Portions Copyright (c) 1994, Regents of the University of California - * - * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/util.c,v 1.18 2001/10/25 05:49:30 momjian Exp $ - * - *------------------------------------------------------------------------- - */ -/* - * UTILITY ROUTINES - * pqdebug - send a string to the debugging output port - * PQtrace - turn on pqdebug() tracing - * PQuntrace - turn off pqdebug() tracing - */ - -#include "postgres.h" - -#include "libpq/libpq.h" - - -/* ---------------- - * global variables for backend libpq - * ---------------- - */ -char PQerrormsg[PQERRORMSG_LENGTH]; - -/* - * These are not really global --- they are referred to nowhere else. - * We declare them as global symbols to make them easier to set in a debugger. - */ - -int PQtracep = 0; /* 1 to print out debugging messages */ - -FILE *debug_port = (FILE *) NULL; - -/* ---------------------------------------------------------------- - * PQ utility routines - * ---------------------------------------------------------------- - */ - -void -pqdebug(char *fmt, char *msg) -{ - if (!fmt) - return; - - if (PQtracep) - { - /* - * if nothing else was suggested default to stderr - */ - if (!debug_port) - debug_port = stderr; - fprintf(debug_port, fmt, msg); - fprintf(debug_port, "\n"); - } -} - -/* -------------------------------- - * PQtrace() / PQuntrace() - * -------------------------------- - */ -void -PQtrace() -{ - PQtracep = 1; -} - -void -PQuntrace() -{ - PQtracep = 0; -} |