1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-25 20:23:07 +03:00

From: Massimo Dal Zotto <dz@cs.unitn.it>

> tprintf.patch
>
>       tprintf.patch
>
>       adds functions and macros which implement a conditional trace package
>       with the ability to change flags and numeric options of running
>       backends at runtime.
>       Options/flags can be specified in the command line and/or read from
>       the file pg_options in the data directory.
This commit is contained in:
Marc G. Fournier
1998-08-25 21:34:10 +00:00
parent 51e8e187d1
commit 7414d61950
9 changed files with 430 additions and 188 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/assert.c,v 1.9 1998/06/18 16:35:38 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/assert.c,v 1.10 1998/08/25 21:34:06 scrappy Exp $
*
* NOTE
* This should eventually work with elog(), dlog(), etc.
@@ -21,6 +21,7 @@
#include "utils/module.h"
#include "utils/exc.h"
#include "utils/trace.h"
int
ExceptionalCondition(char *conditionName,
@@ -39,7 +40,7 @@ ExceptionalCondition(char *conditionName,
|| !PointerIsValid(fileName)
|| !PointerIsValid(exceptionP))
{
fprintf(stderr, "ExceptionalCondition: bad arguments\n");
EPRINTF("TRAP: ExceptionalCondition: bad arguments\n");
ExcAbort(exceptionP,
(ExcDetail) detail,
@@ -48,9 +49,9 @@ ExceptionalCondition(char *conditionName,
}
else
{
fprintf(stderr,
"%s(\"%s:%s\", File: \"%s\", Line: %d)\n",
exceptionP->message, conditionName, detail == NULL ? "" : detail,
EPRINTF("TRAP: %s(\"%s:%s\", File: \"%s\", Line: %d)\n",
exceptionP->message, conditionName,
(detail == NULL ? "" : detail),
fileName, lineNumber);
}