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

Commit2645cb5

Browse files
committed
Fix the assert_enabled issue properly. This eliminates the former ABI
difference between USE_ASSERT_CHECKING and not: the assert_enabledvariable is always there.
1 parentcbf3993 commit2645cb5

File tree

5 files changed

+8
-17
lines changed

5 files changed

+8
-17
lines changed

‎contrib/ltree/_ltree_gist.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -546,10 +546,6 @@ _ltree_consistent(PG_FUNCTION_ARGS)
546546
StrategyNumberstrategy= (StrategyNumber)PG_GETARG_UINT16(2);
547547
boolres= false;
548548

549-
#ifndefassert_enabled
550-
#defineassert_enabled 0
551-
#endif
552-
553549
switch (strategy)
554550
{
555551
case10:

‎contrib/ltree/ltree_gist.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -631,10 +631,6 @@ ltree_consistent(PG_FUNCTION_ARGS)
631631
StrategyNumberstrategy= (StrategyNumber)PG_GETARG_UINT16(2);
632632
boolres= false;
633633

634-
#ifndefassert_enabled
635-
#defineassert_enabled 0
636-
#endif
637-
638634
switch (strategy)
639635
{
640636
caseBTLessStrategyNumber:

‎src/backend/port/ipc_test.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
*
2323
* IDENTIFICATION
24-
* $PostgreSQL: pgsql/src/backend/port/ipc_test.c,v 1.18 2005/10/15 02:49:22 momjian Exp $
24+
* $PostgreSQL: pgsql/src/backend/port/ipc_test.c,v 1.19 2006/01/08 21:24:36 tgl Exp $
2525
*
2626
*-------------------------------------------------------------------------
2727
*/
@@ -47,16 +47,13 @@ volatile uint32 InterruptHoldoffCount = 0;
4747
volatileuint32CritSectionCount=0;
4848

4949
boolIsUnderPostmaster= false;
50+
boolassert_enabled= true;
5051

5152
intMaxBackends=32;
5253
intNBuffers=64;
5354

5455
char*DataDir=".";
5556

56-
#ifndefassert_enabled
57-
boolassert_enabled= true;
58-
#endif
59-
6057

6158
#defineMAX_ON_EXITS 20
6259

‎src/backend/utils/misc/guc.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.307 2006/01/0820:13:33 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.308 2006/01/0821:24:36 tgl Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -147,7 +147,11 @@ static const char *show_tcp_keepalives_count(void);
147147
/*
148148
* GUC option variables that are exported from this module
149149
*/
150+
#ifdefUSE_ASSERT_CHECKING
150151
boolassert_enabled= true;
152+
#else
153+
boolassert_enabled= false;
154+
#endif
151155
boollog_duration= false;
152156
boolDebug_print_plan= false;
153157
boolDebug_print_parse= false;

‎src/include/postgres.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
1111
* Portions Copyright (c) 1995, Regents of the University of California
1212
*
13-
* $PostgreSQL: pgsql/src/include/postgres.h,v 1.71 2005/04/14 01:38:21 tgl Exp $
13+
* $PostgreSQL: pgsql/src/include/postgres.h,v 1.72 2006/01/08 21:24:37 tgl Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -484,7 +484,6 @@ extern DLLIMPORT bool assert_enabled;
484484
/*
485485
* Trap
486486
*Generates an exception if the given condition is true.
487-
*
488487
*/
489488
#defineTrap(condition,errorType) \
490489
do { \
@@ -510,7 +509,6 @@ extern DLLIMPORT bool assert_enabled;
510509
#defineAssertMacro(condition)((void)true)
511510
#defineAssertArg(condition)
512511
#defineAssertState(condition)
513-
#defineassert_enabled 0
514512
#else
515513
#defineAssert(condition) \
516514
Trap(!(condition), "FailedAssertion")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp