Skip to content

Commit 5fb1022

Browse files
committed
Don't include miscadmin.h in elog.h, since the former is not part of
the installed header file set.
1 parent a0f8636 commit 5fb1022

File tree

2 files changed

+24
-19
lines changed

2 files changed

+24
-19
lines changed

src/backend/utils/error/elog.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.72 2000/12/03 20:45:36 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.73 2000/12/06 17:25:46 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -33,6 +33,7 @@
3333
#include "commands/copy.h"
3434
#include "libpq/libpq.h"
3535
#include "libpq/pqformat.h"
36+
#include "miscadmin.h"
3637
#include "storage/proc.h"
3738
#include "tcop/tcopprot.h"
3839
#include "utils/memutils.h"

src/include/utils/elog.h

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@
77
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: elog.h,v 1.19 2000/12/03 10:27:29 vadim Exp $
10+
* $Id: elog.h,v 1.20 2000/12/06 17:25:45 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414
#ifndef ELOG_H
1515
#define ELOG_H
1616

17-
#include "miscadmin.h"
18-
1917
#define NOTICE 0 /* random info - no special action */
2018
#define ERROR (-1) /* user error - return to known state */
2119
#define FATAL 1 /* fatal error - abort process */
@@ -30,23 +28,29 @@ extern int Use_syslog;
3028
#endif
3129

3230
/*
33-
* If StopIfError > 0 signal handlers don't do
34-
* elog(ERROR|FATAL) but remember what action was
35-
* required with QueryCancel & ExitAfterAbort
31+
* If StopIfError > 0 signal handlers mustn't do
32+
* elog(ERROR|FATAL), instead remember what action is
33+
* required with QueryCancel & ExitAfterAbort.
3634
*/
35+
extern uint32 StopIfError; /* duplicates access/xlog.h */
36+
extern bool QueryCancel; /* duplicates miscadmin.h */
3737
extern bool ExitAfterAbort;
38-
#define START_CRIT_CODE StopIfError++
39-
#define END_CRIT_CODE \
40-
if (!StopIfError)\
41-
elog(STOP, "Not in critical section");\
42-
StopIfError--;\
43-
if (!StopIfError && QueryCancel)\
44-
{\
45-
if (ExitAfterAbort)\
46-
elog(FATAL, "The system is shutting down");\
47-
else\
48-
elog(ERROR, "Query was cancelled.");\
49-
}
38+
39+
#define START_CRIT_CODE (StopIfError++)
40+
41+
#define END_CRIT_CODE \
42+
do { \
43+
if (!StopIfError) \
44+
elog(STOP, "Not in critical section"); \
45+
StopIfError--; \
46+
if (!StopIfError && QueryCancel) \
47+
{ \
48+
if (ExitAfterAbort) \
49+
elog(FATAL, "The system is shutting down"); \
50+
else \
51+
elog(ERROR, "Query was cancelled."); \
52+
} \
53+
} while(0)
5054

5155
extern bool Log_timestamp;
5256
extern bool Log_pid;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy