Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5fb1022

Browse files
committed
Don't include miscadmin.h in elog.h, since the former is not part of
the installed header file set.
1 parenta0f8636 commit5fb1022

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
#ifndefELOG_H
1515
#defineELOG_H
1616

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

3230
/*
33-
* If StopIfError > 0 signal handlersdon't do
34-
* elog(ERROR|FATAL) but remember what actionwas
35-
* required with QueryCancel & ExitAfterAbort
31+
* If StopIfError > 0 signal handlersmustn't do
32+
* elog(ERROR|FATAL), instead remember what actionis
33+
* required with QueryCancel & ExitAfterAbort.
3634
*/
35+
externuint32StopIfError;/* duplicates access/xlog.h */
36+
externboolQueryCancel;/* duplicates miscadmin.h */
3737
externboolExitAfterAbort;
38-
#defineSTART_CRIT_CODEStopIfError++
39-
#defineEND_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+
#defineSTART_CRIT_CODE(StopIfError++)
40+
41+
#defineEND_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
externboolLog_timestamp;
5256
externboolLog_pid;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp