1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

elog mop-up: bring some straggling fprintf(stderr)'s into the elog world.

This commit is contained in:
Tom Lane
2003-07-27 21:49:55 +00:00
parent 606debf268
commit b556e8200e
18 changed files with 317 additions and 383 deletions

View File

@@ -21,7 +21,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/ipc_test.c,v 1.6 2003/07/22 23:30:39 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/port/ipc_test.c,v 1.7 2003/07/27 21:49:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -46,6 +46,8 @@ volatile bool ImmediateInterruptOK = false;
volatile uint32 InterruptHoldoffCount = 0;
volatile uint32 CritSectionCount = 0;
const bool ExecBackend = false;
bool IsUnderPostmaster = false;
int MaxBackends = DEF_MAXBACKENDS;
@@ -128,14 +130,60 @@ ExceptionalCondition(char *conditionName,
return 0;
}
void
elog(int lev, const char *fmt,...)
bool
errstart(int elevel, const char *filename, int lineno,
const char *funcname)
{
if (lev >= ERROR)
{
fprintf(stderr, "elog(%s)\n", fmt);
abort();
}
return (elevel >= ERROR);
}
void
errfinish(int dummy, ...)
{
proc_exit(1);
}
void
elog_finish(int elevel, const char *fmt, ...)
{
fprintf(stderr, "ERROR: %s\n", fmt);
proc_exit(1);
}
int
errcode(int sqlerrcode)
{
return 0; /* return value does not matter */
}
int
errmsg(const char *fmt, ...)
{
fprintf(stderr, "ERROR: %s\n", fmt);
return 0; /* return value does not matter */
}
int
errmsg_internal(const char *fmt, ...)
{
fprintf(stderr, "ERROR: %s\n", fmt);
return 0; /* return value does not matter */
}
int
errdetail(const char *fmt, ...)
{
fprintf(stderr, "DETAIL: %s\n", fmt);
return 0; /* return value does not matter */
}
int
errhint(const char *fmt, ...)
{
fprintf(stderr, "HINT: %s\n", fmt);
return 0; /* return value does not matter */
}