Fix the assert_enabled issue properly. This eliminates the former ABI
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 8 Jan 2006 21:24:37 +0000 (21:24 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 8 Jan 2006 21:24:37 +0000 (21:24 +0000)
difference between USE_ASSERT_CHECKING and not: the assert_enabled
variable is always there.

contrib/ltree/_ltree_gist.c
contrib/ltree/ltree_gist.c
src/backend/port/ipc_test.c
src/backend/utils/misc/guc.c
src/include/postgres.h

index 359ddfe4d7d0cbe80b2c12adb5f1250b8748d097..44e25fd28f1bec00d312443e789339a089b64df5 100644 (file)
@@ -546,10 +546,6 @@ _ltree_consistent(PG_FUNCTION_ARGS)
        StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
        bool            res = false;
 
-#ifndef assert_enabled
-#define assert_enabled 0
-#endif
-
        switch (strategy)
        {
                case 10:
index 9cdbcde886e7a889be9b01d58c9136db333cb7d1..5447677e02c062ad178d5a65469bb9b16ebac539 100644 (file)
@@ -631,10 +631,6 @@ ltree_consistent(PG_FUNCTION_ARGS)
        StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
        bool            res = false;
 
-#ifndef assert_enabled
-#define assert_enabled 0
-#endif
-
        switch (strategy)
        {
                case BTLessStrategyNumber:
index 89ebe1ded73aef67d77e70c07fa3568c3b538b09..25fae2a9b92fbe3ced2f180ced9868805bc44a58 100644 (file)
@@ -21,7 +21,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/port/ipc_test.c,v 1.18 2005/10/15 02:49:22 momjian Exp $
+ *       $PostgreSQL: pgsql/src/backend/port/ipc_test.c,v 1.19 2006/01/08 21:24:36 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -47,16 +47,13 @@ volatile uint32 InterruptHoldoffCount = 0;
 volatile uint32 CritSectionCount = 0;
 
 bool           IsUnderPostmaster = false;
+bool           assert_enabled = true;
 
 int                    MaxBackends = 32;
 int                    NBuffers = 64;
 
 char      *DataDir = ".";
 
-#ifndef assert_enabled
-bool           assert_enabled = true;
-#endif
-
 
 #define MAX_ON_EXITS 20
 
index 9c8fce2aba5041296cc2bfa1231dcf8fc7f708bd..b466e135b691775b302ce5364834a9a20280c3ba 100644 (file)
@@ -10,7 +10,7 @@
  * Written by Peter Eisentraut <peter_e@gmx.net>.
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.307 2006/01/08 20:13:33 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.308 2006/01/08 21:24:36 tgl Exp $
  *
  *--------------------------------------------------------------------
  */
@@ -147,7 +147,11 @@ static const char *show_tcp_keepalives_count(void);
 /*
  * GUC option variables that are exported from this module
  */
+#ifdef USE_ASSERT_CHECKING
 bool           assert_enabled = true;
+#else
+bool           assert_enabled = false;
+#endif
 bool           log_duration = false;
 bool           Debug_print_plan = false;
 bool           Debug_print_parse = false;
index b82cd2fa8b59a50a5b6c543f8a4d64ce32de0cf3..8d1a38941b8244eb1a6825ce1e560ab1d9fb5d42 100644 (file)
@@ -10,7 +10,7 @@
  * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
  * Portions Copyright (c) 1995, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/postgres.h,v 1.71 2005/04/14 01:38:21 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/postgres.h,v 1.72 2006/01/08 21:24:37 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -484,7 +484,6 @@ extern DLLIMPORT bool assert_enabled;
 /*
  * Trap
  *             Generates an exception if the given condition is true.
- *
  */
 #define Trap(condition, errorType) \
                do { \
@@ -510,7 +509,6 @@ extern DLLIMPORT bool assert_enabled;
 #define AssertMacro(condition) ((void)true)
 #define AssertArg(condition)
 #define AssertState(condition)
-#define assert_enabled 0
 #else
 #define Assert(condition) \
                Trap(!(condition), "FailedAssertion")