1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-04 20:11:56 +03:00

Eliminate elog()'s hardwired limit on length of an error message.

This change seems necessary in conjunction with long queries, and it
cleans up some bogosity in connection with long EXPLAIN texts anyway.
Note that current libpq will accept any length error message (at least
until it runs out of memory); prior versions have a limit of 8K, but
will cleanly discard excess error text, so there shouldn't be any
big compatibility problems with old clients.
This commit is contained in:
Tom Lane
1999-09-11 19:06:42 +00:00
parent 1e4f0197bb
commit b399805e22
4 changed files with 245 additions and 145 deletions

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: elog.h,v 1.11 1999/07/13 21:17:42 momjian Exp $
* $Id: elog.h,v 1.12 1999/09/11 19:06:25 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,36 +14,16 @@
#define ELOG_H
#define NOTICE 0 /* random info - no special action */
#define ERROR -1 /* user error - return to known state */
#define FATAL 1 /* Fatal error - abort process */
#define DEBUG -2 /* debug message */
#define NOIND -3 /* debug message, don't indent as far */
#define ERROR (-1) /* user error - return to known state */
#define FATAL 1 /* fatal error - abort process */
#define REALLYFATAL 2 /* take down the other backends with me */
#define DEBUG (-2) /* debug message */
#define NOIND (-3) /* debug message, don't indent as far */
#ifdef NOT_USED
#define PTIME 0x100 /* prepend time to message */
#define POS 0x200 /* prepend source position to message */
#define USERMSG 0x400 /* send message to user */
#define TERM 0x800 /* send message to terminal */
#define DBLOG 0x1000 /* put message in per db log */
#define SLOG 0x2000 /* put message in system log */
#define ABORTX 0x4000 /* abort process after logging */
#endif
/* Increase this to be able to use postmaster -d 3 with complex
* view definitions (which are transformed to very, very large INSERT statements
* and if -d 3 is used the query string of these statements is printed using
* vsprintf which expects enough memory reserved! */
#define ELOG_MAXLEN 12288
/* uncomment the following if you want your elog's to be timestamped */
/* #define ELOG_TIMESTAMPS */
extern void elog(int lev, const char *fmt,...);
extern void elog(int lev, const char *fmt, ...);
#ifndef PG_STANDALONE
int DebugFileOpen(void);
extern int DebugFileOpen(void);
#endif
#endif /* ELOG_H */