summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meskes2007-01-12 10:00:14 +0000
committerMichael Meskes2007-01-12 10:00:14 +0000
commitb8f611cf4b119d49dc28b58d610c9d0a5fa5cde7 (patch)
treeef6665a154105fa3fe19ef5a773e1787e9898c5f
parent97903c3d94b6d6ce089c90c34c1000653007b020 (diff)
Simplified regression handling
Added patch by Joachim to work around OpenBSD bug in regression suite.
-rw-r--r--src/interfaces/ecpg/ecpglib/connect.c3
-rw-r--r--src/interfaces/ecpg/ecpglib/data.c4
-rw-r--r--src/interfaces/ecpg/ecpglib/extern.h4
-rw-r--r--src/interfaces/ecpg/ecpglib/misc.c14
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.c6
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-charfuncs.c2
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-dec_test.c2
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c2
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c2
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-rnull.c2
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-test_informix.c2
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c2
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test1.c2
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test2.c2
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test3.c2
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test4.c2
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test5.c2
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c2
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c2
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c2
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c2
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-comment.c2
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-define.c2
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-init.c2
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-type.c2
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-variable.c2
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-whenever.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-array.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-binary.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-code100.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-copystdout.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-define.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-desc.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-dynalloc.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-dynalloc2.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-dyntest.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-execute.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-fetch.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-func.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-indicators.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-quote.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-show.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-update.c2
-rw-r--r--src/interfaces/ecpg/test/expected/thread-thread.c2
-rw-r--r--src/interfaces/ecpg/test/expected/thread-thread_implicit.c2
-rw-r--r--src/interfaces/ecpg/test/pg_regress.sh25
46 files changed, 66 insertions, 70 deletions
diff --git a/src/interfaces/ecpg/ecpglib/connect.c b/src/interfaces/ecpg/ecpglib/connect.c
index b3cfd80bdc..369c92f48a 100644
--- a/src/interfaces/ecpg/ecpglib/connect.c
+++ b/src/interfaces/ecpg/ecpglib/connect.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.38 2007/01/11 15:47:33 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.39 2007/01/12 10:00:12 meskes Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
@@ -19,7 +19,6 @@ static pthread_once_t actual_connection_key_once = PTHREAD_ONCE_INIT;
#endif
static struct connection *actual_connection = NULL;
static struct connection *all_connections = NULL;
-extern int ecpg_internal_regression_mode;
#ifdef ENABLE_THREAD_SAFETY
static void
diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c
index 6b2bbfa64b..3d8842b2aa 100644
--- a/src/interfaces/ecpg/ecpglib/data.c
+++ b/src/interfaces/ecpg/ecpglib/data.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.36 2007/01/11 15:47:33 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.37 2007/01/12 10:00:12 meskes Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
@@ -16,8 +16,6 @@
#include "pgtypes_timestamp.h"
#include "pgtypes_interval.h"
-extern int ecpg_internal_regression_mode;
-
static bool
garbage_left(enum ARRAY_TYPE isarray, char *scan_length, enum COMPAT_MODE compat)
{
diff --git a/src/interfaces/ecpg/ecpglib/extern.h b/src/interfaces/ecpg/ecpglib/extern.h
index 8759fac4fd..d5d44a79c0 100644
--- a/src/interfaces/ecpg/ecpglib/extern.h
+++ b/src/interfaces/ecpg/ecpglib/extern.h
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/extern.h,v 1.20 2006/10/04 00:30:11 momjian Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/extern.h,v 1.21 2007/01/12 10:00:13 meskes Exp $ */
#ifndef _ECPG_LIB_EXTERN_H
#define _ECPG_LIB_EXTERN_H
@@ -12,6 +12,8 @@ enum COMPAT_MODE
ECPG_COMPAT_PGSQL = 0, ECPG_COMPAT_INFORMIX, ECPG_COMPAT_INFORMIX_SE
};
+extern bool ecpg_internal_regression_mode;
+
#define INFORMIX_MODE(X) ((X) == ECPG_COMPAT_INFORMIX || (X) == ECPG_COMPAT_INFORMIX_SE)
enum ARRAY_TYPE
diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c
index 122c7d6328..4273819e79 100644
--- a/src/interfaces/ecpg/ecpglib/misc.c
+++ b/src/interfaces/ecpg/ecpglib/misc.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.33 2007/01/11 15:47:33 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.34 2007/01/12 10:00:13 meskes Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
@@ -28,7 +28,7 @@
#endif
#endif
-extern int ecpg_internal_regression_mode;
+bool ecpg_internal_regression_mode = false;
static struct sqlca_t sqlca_init =
{
@@ -228,8 +228,16 @@ ECPGdebug(int n, FILE *dbgs)
pthread_mutex_lock(&debug_init_mutex);
#endif
- simple_debug = n;
+ if (n > 100)
+ {
+ ecpg_internal_regression_mode = true;
+ simple_debug = n-100;
+ }
+ else
+ simple_debug = n;
+
debugstream = dbgs;
+
ECPGlog("ECPGdebug: set to %d\n", simple_debug);
#ifdef ENABLE_THREAD_SAFETY
diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c
index 66b4138c89..c8b2327289 100644
--- a/src/interfaces/ecpg/preproc/ecpg.c
+++ b/src/interfaces/ecpg/preproc/ecpg.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.95 2007/01/11 15:47:33 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.96 2007/01/12 10:00:13 meskes Exp $ */
/* New main for ecpg, the PostgreSQL embedded SQL precompiler. */
/* (C) Michael Meskes <[email protected]> Feb 5th, 1998 */
@@ -425,7 +425,6 @@ main(int argc, char *const argv[])
else
fprintf(yyout, "/* Processed by ecpg (%d.%d.%d) */\n", MAJOR_VERSION, MINOR_VERSION, PATCHLEVEL);
- fprintf(yyout, "int ecpg_internal_regression_mode = %d;\n", regression_mode);
if (header_mode == false)
{
fprintf(yyout, "/* These include files are added by the preprocessor */\n#include <ecpgtype.h>\n#include <ecpglib.h>\n#include <ecpgerrno.h>\n#include <sqlca.h>\n");
@@ -437,6 +436,9 @@ main(int argc, char *const argv[])
fprintf(yyout, "/* End of automatic include section */\n");
}
+ if (regression_mode)
+ fprintf(yyout, "#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))\n");
+
output_line_number();
/* and parse the source */
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.c b/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.c
index f0090cc197..79ab5af5ae 100644
--- a/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.c
+++ b/src/interfaces/ecpg/test/expected/compat_informix-charfuncs.c
@@ -1,5 +1,4 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
@@ -8,6 +7,7 @@ int ecpg_internal_regression_mode = 1;
/* Needed for informix compatibility */
#include <ecpg_informix.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "charfuncs.pgc"
#include <stdio.h>
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c b/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c
index 323e2082a9..d71be24e4e 100644
--- a/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c
+++ b/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c
@@ -1,5 +1,4 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
@@ -8,6 +7,7 @@ int ecpg_internal_regression_mode = 1;
/* Needed for informix compatibility */
#include <ecpg_informix.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "dec_test.pgc"
#include <stdio.h>
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c b/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c
index 6ec78475af..167535a59b 100644
--- a/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c
+++ b/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c
@@ -1,5 +1,4 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
@@ -8,6 +7,7 @@ int ecpg_internal_regression_mode = 1;
/* Needed for informix compatibility */
#include <ecpg_informix.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "rfmtdate.pgc"
#include <stdio.h>
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c b/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c
index 2c96cc0e76..0b0466ae14 100644
--- a/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c
+++ b/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c
@@ -1,5 +1,4 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
@@ -8,6 +7,7 @@ int ecpg_internal_regression_mode = 1;
/* Needed for informix compatibility */
#include <ecpg_informix.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "rfmtlong.pgc"
#include <stdio.h>
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rnull.c b/src/interfaces/ecpg/test/expected/compat_informix-rnull.c
index 9a6df4dbef..84acd62309 100644
--- a/src/interfaces/ecpg/test/expected/compat_informix-rnull.c
+++ b/src/interfaces/ecpg/test/expected/compat_informix-rnull.c
@@ -1,5 +1,4 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
@@ -8,6 +7,7 @@ int ecpg_internal_regression_mode = 1;
/* Needed for informix compatibility */
#include <ecpg_informix.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "rnull.pgc"
#include "sqltypes.h"
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c b/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c
index 8aab843540..bd36a2a5e3 100644
--- a/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c
+++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix.c
@@ -1,5 +1,4 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
@@ -8,6 +7,7 @@ int ecpg_internal_regression_mode = 1;
/* Needed for informix compatibility */
#include <ecpg_informix.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "test_informix.pgc"
#include "sqltypes.h"
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c
index 8b0495d7a1..db94fdf86e 100644
--- a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c
+++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c
@@ -1,5 +1,4 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
@@ -8,6 +7,7 @@ int ecpg_internal_regression_mode = 1;
/* Needed for informix compatibility */
#include <ecpg_informix.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "test_informix2.pgc"
#include <stdio.h>
diff --git a/src/interfaces/ecpg/test/expected/connect-test1.c b/src/interfaces/ecpg/test/expected/connect-test1.c
index 2f1cdbec1b..aee8e26f1b 100644
--- a/src/interfaces/ecpg/test/expected/connect-test1.c
+++ b/src/interfaces/ecpg/test/expected/connect-test1.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "test1.pgc"
/*
diff --git a/src/interfaces/ecpg/test/expected/connect-test2.c b/src/interfaces/ecpg/test/expected/connect-test2.c
index 2a591867ae..a5ab29da3f 100644
--- a/src/interfaces/ecpg/test/expected/connect-test2.c
+++ b/src/interfaces/ecpg/test/expected/connect-test2.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "test2.pgc"
/*
diff --git a/src/interfaces/ecpg/test/expected/connect-test3.c b/src/interfaces/ecpg/test/expected/connect-test3.c
index ba0cc5529b..f601f9b900 100644
--- a/src/interfaces/ecpg/test/expected/connect-test3.c
+++ b/src/interfaces/ecpg/test/expected/connect-test3.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "test3.pgc"
/*
diff --git a/src/interfaces/ecpg/test/expected/connect-test4.c b/src/interfaces/ecpg/test/expected/connect-test4.c
index 5ebee62355..42c017471e 100644
--- a/src/interfaces/ecpg/test/expected/connect-test4.c
+++ b/src/interfaces/ecpg/test/expected/connect-test4.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "test4.pgc"
#include <stdlib.h>
diff --git a/src/interfaces/ecpg/test/expected/connect-test5.c b/src/interfaces/ecpg/test/expected/connect-test5.c
index 1335a91991..b226b46a03 100644
--- a/src/interfaces/ecpg/test/expected/connect-test5.c
+++ b/src/interfaces/ecpg/test/expected/connect-test5.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "test5.pgc"
/*
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c
index d6bf060aa4..413ff7acd0 100644
--- a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "dt_test.pgc"
#include <stdio.h>
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c
index 8d9e180e5b..bac2dd6924 100644
--- a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "dt_test2.pgc"
#include <stdio.h>
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c
index 3d06dfdf99..48d0e6f9b1 100644
--- a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "num_test.pgc"
#include <stdio.h>
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c
index ec8477fdc9..9b6bada22a 100644
--- a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "num_test2.pgc"
#include <stdio.h>
diff --git a/src/interfaces/ecpg/test/expected/preproc-comment.c b/src/interfaces/ecpg/test/expected/preproc-comment.c
index 6bbc77579a..57cd4f5e2a 100644
--- a/src/interfaces/ecpg/test/expected/preproc-comment.c
+++ b/src/interfaces/ecpg/test/expected/preproc-comment.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "comment.pgc"
#include <stdlib.h>
diff --git a/src/interfaces/ecpg/test/expected/preproc-define.c b/src/interfaces/ecpg/test/expected/preproc-define.c
index a2d1489520..44cd6eecc5 100644
--- a/src/interfaces/ecpg/test/expected/preproc-define.c
+++ b/src/interfaces/ecpg/test/expected/preproc-define.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "define.pgc"
#include <stdlib.h>
diff --git a/src/interfaces/ecpg/test/expected/preproc-init.c b/src/interfaces/ecpg/test/expected/preproc-init.c
index 052a4af051..e0fc30b63b 100644
--- a/src/interfaces/ecpg/test/expected/preproc-init.c
+++ b/src/interfaces/ecpg/test/expected/preproc-init.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "init.pgc"
diff --git a/src/interfaces/ecpg/test/expected/preproc-type.c b/src/interfaces/ecpg/test/expected/preproc-type.c
index 034787875e..68805fa253 100644
--- a/src/interfaces/ecpg/test/expected/preproc-type.c
+++ b/src/interfaces/ecpg/test/expected/preproc-type.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "type.pgc"
#include <stdio.h>
diff --git a/src/interfaces/ecpg/test/expected/preproc-variable.c b/src/interfaces/ecpg/test/expected/preproc-variable.c
index 0913ecd06b..a6beea09c8 100644
--- a/src/interfaces/ecpg/test/expected/preproc-variable.c
+++ b/src/interfaces/ecpg/test/expected/preproc-variable.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "variable.pgc"
#include <stdlib.h>
diff --git a/src/interfaces/ecpg/test/expected/preproc-whenever.c b/src/interfaces/ecpg/test/expected/preproc-whenever.c
index 446541edfb..63a7d09f29 100644
--- a/src/interfaces/ecpg/test/expected/preproc-whenever.c
+++ b/src/interfaces/ecpg/test/expected/preproc-whenever.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "whenever.pgc"
#include <stdlib.h>
diff --git a/src/interfaces/ecpg/test/expected/sql-array.c b/src/interfaces/ecpg/test/expected/sql-array.c
index 7b996b3db8..fc64d7220d 100644
--- a/src/interfaces/ecpg/test/expected/sql-array.c
+++ b/src/interfaces/ecpg/test/expected/sql-array.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "array.pgc"
#include <locale.h>
diff --git a/src/interfaces/ecpg/test/expected/sql-binary.c b/src/interfaces/ecpg/test/expected/sql-binary.c
index 418605be6f..8c9a5f286a 100644
--- a/src/interfaces/ecpg/test/expected/sql-binary.c
+++ b/src/interfaces/ecpg/test/expected/sql-binary.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "binary.pgc"
#include <stdio.h>
diff --git a/src/interfaces/ecpg/test/expected/sql-code100.c b/src/interfaces/ecpg/test/expected/sql-code100.c
index 2368b21f33..96822bedcf 100644
--- a/src/interfaces/ecpg/test/expected/sql-code100.c
+++ b/src/interfaces/ecpg/test/expected/sql-code100.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "code100.pgc"
diff --git a/src/interfaces/ecpg/test/expected/sql-copystdout.c b/src/interfaces/ecpg/test/expected/sql-copystdout.c
index 4ae3e9d92e..d035647517 100644
--- a/src/interfaces/ecpg/test/expected/sql-copystdout.c
+++ b/src/interfaces/ecpg/test/expected/sql-copystdout.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "copystdout.pgc"
#include <stdio.h>
diff --git a/src/interfaces/ecpg/test/expected/sql-define.c b/src/interfaces/ecpg/test/expected/sql-define.c
index e66aa1994b..69122812c2 100644
--- a/src/interfaces/ecpg/test/expected/sql-define.c
+++ b/src/interfaces/ecpg/test/expected/sql-define.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "define.pgc"
diff --git a/src/interfaces/ecpg/test/expected/sql-desc.c b/src/interfaces/ecpg/test/expected/sql-desc.c
index c735f2749f..708875a971 100644
--- a/src/interfaces/ecpg/test/expected/sql-desc.c
+++ b/src/interfaces/ecpg/test/expected/sql-desc.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "desc.pgc"
diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc.c b/src/interfaces/ecpg/test/expected/sql-dynalloc.c
index 5fe0584042..ce178e8ce9 100644
--- a/src/interfaces/ecpg/test/expected/sql-dynalloc.c
+++ b/src/interfaces/ecpg/test/expected/sql-dynalloc.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "dynalloc.pgc"
#include <stdio.h>
diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc2.c b/src/interfaces/ecpg/test/expected/sql-dynalloc2.c
index 7d38c019b2..19fd84fe94 100644
--- a/src/interfaces/ecpg/test/expected/sql-dynalloc2.c
+++ b/src/interfaces/ecpg/test/expected/sql-dynalloc2.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "dynalloc2.pgc"
#include <stdio.h>
diff --git a/src/interfaces/ecpg/test/expected/sql-dyntest.c b/src/interfaces/ecpg/test/expected/sql-dyntest.c
index 94d84e76dd..242c93a395 100644
--- a/src/interfaces/ecpg/test/expected/sql-dyntest.c
+++ b/src/interfaces/ecpg/test/expected/sql-dyntest.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "dyntest.pgc"
/* dynamic SQL test program
diff --git a/src/interfaces/ecpg/test/expected/sql-execute.c b/src/interfaces/ecpg/test/expected/sql-execute.c
index 0fcc0126ae..4d0ed38eb0 100644
--- a/src/interfaces/ecpg/test/expected/sql-execute.c
+++ b/src/interfaces/ecpg/test/expected/sql-execute.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "execute.pgc"
#include <stdlib.h>
diff --git a/src/interfaces/ecpg/test/expected/sql-fetch.c b/src/interfaces/ecpg/test/expected/sql-fetch.c
index b39ac3ffe1..78fc79e8da 100644
--- a/src/interfaces/ecpg/test/expected/sql-fetch.c
+++ b/src/interfaces/ecpg/test/expected/sql-fetch.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "fetch.pgc"
#include <stdio.h>
diff --git a/src/interfaces/ecpg/test/expected/sql-func.c b/src/interfaces/ecpg/test/expected/sql-func.c
index 881c2a64e5..bfa7bbdd94 100644
--- a/src/interfaces/ecpg/test/expected/sql-func.c
+++ b/src/interfaces/ecpg/test/expected/sql-func.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "func.pgc"
#include <stdio.h>
diff --git a/src/interfaces/ecpg/test/expected/sql-indicators.c b/src/interfaces/ecpg/test/expected/sql-indicators.c
index ca3fc391e9..99be1bfc39 100644
--- a/src/interfaces/ecpg/test/expected/sql-indicators.c
+++ b/src/interfaces/ecpg/test/expected/sql-indicators.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "indicators.pgc"
#include <stdio.h>
diff --git a/src/interfaces/ecpg/test/expected/sql-quote.c b/src/interfaces/ecpg/test/expected/sql-quote.c
index 5fbf964b57..170c27c3dc 100644
--- a/src/interfaces/ecpg/test/expected/sql-quote.c
+++ b/src/interfaces/ecpg/test/expected/sql-quote.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "quote.pgc"
#include <stdio.h>
diff --git a/src/interfaces/ecpg/test/expected/sql-show.c b/src/interfaces/ecpg/test/expected/sql-show.c
index 79ff09f176..d64b6d2953 100644
--- a/src/interfaces/ecpg/test/expected/sql-show.c
+++ b/src/interfaces/ecpg/test/expected/sql-show.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "show.pgc"
#include <stdio.h>
diff --git a/src/interfaces/ecpg/test/expected/sql-update.c b/src/interfaces/ecpg/test/expected/sql-update.c
index 69052ef8ea..ca35ed8437 100644
--- a/src/interfaces/ecpg/test/expected/sql-update.c
+++ b/src/interfaces/ecpg/test/expected/sql-update.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "update.pgc"
#include <stdio.h>
diff --git a/src/interfaces/ecpg/test/expected/thread-thread.c b/src/interfaces/ecpg/test/expected/thread-thread.c
index 890276c2f8..41100f7cc3 100644
--- a/src/interfaces/ecpg/test/expected/thread-thread.c
+++ b/src/interfaces/ecpg/test/expected/thread-thread.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "thread.pgc"
/*
diff --git a/src/interfaces/ecpg/test/expected/thread-thread_implicit.c b/src/interfaces/ecpg/test/expected/thread-thread_implicit.c
index 21cf8e3c2b..9a8bbcc434 100644
--- a/src/interfaces/ecpg/test/expected/thread-thread_implicit.c
+++ b/src/interfaces/ecpg/test/expected/thread-thread_implicit.c
@@ -1,11 +1,11 @@
/* Processed by ecpg (regression mode) */
-int ecpg_internal_regression_mode = 1;
/* These include files are added by the preprocessor */
#include <ecpgtype.h>
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
+#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
#line 1 "thread_implicit.pgc"
/*
diff --git a/src/interfaces/ecpg/test/pg_regress.sh b/src/interfaces/ecpg/test/pg_regress.sh
index 108f414088..1396257bba 100644
--- a/src/interfaces/ecpg/test/pg_regress.sh
+++ b/src/interfaces/ecpg/test/pg_regress.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# $PostgreSQL: pgsql/src/interfaces/ecpg/test/pg_regress.sh,v 1.16 2007/01/11 15:47:33 meskes Exp $
+# $PostgreSQL: pgsql/src/interfaces/ecpg/test/pg_regress.sh,v 1.17 2007/01/12 10:00:13 meskes Exp $
me=`basename $0`
@@ -740,6 +740,11 @@ for i in \
*-*-mingw32*)
PLATFORM_TAG="-MinGW32"
;;
+ *-*-openbsd3.8)
+ # OpenBSD 3.8 is buggy:
+ # http://archives.postgresql.org/pgsql-hackers/2006-09/msg00593.php
+ PLATFORM_TAG="-OpenBSD3.8.broken"
+ ;;
esac
outfile_stderr="$outputdir/$outprg.stderr"
@@ -749,24 +754,6 @@ for i in \
# echo "$runprg > $outfile_stdout 2> $outfile_stderr"
$runprg > "$outfile_stdout" 2> "$outfile_stderr"
- # If we don't run on the default port we'll get different output
- # so tweak output files and replace the port number (we put a warning
- # but the price to pay is that we have to tweak the files every time
- # now not only if the port differs from the standard port).
- #if [ "$i" = "connect/test1.pgc" ]; then
- # can we use sed -i on all platforms?
- # for f in "$outfile_stderr" "$outfile_stdout" "$outfile_source"; do
- # mv $f $f.tmp
- # echo >> $f
- # echo "THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT" >> $f
- # echo >> $f
- # MinGW could return such a line:
- # "could not connect to server: Connection refused (0x0000274D/10061)"
- #cat $f.tmp | sed -e s,$PGPORT,55432,g | sed -e "s,could not connect to server: Connection refused (0x.*/.*),could not connect to server: Connection refused,g" >> $f
- # rm $f.tmp
- # done
- #fi
-
mv "$outfile_source" "$outfile_source.tmp"
cat "$outfile_source.tmp" | sed -e 's,^\(#line [0-9]*\) ".*/\([^/]*\)",\1 "\2",' > "$outfile_source"
rm "$outfile_source.tmp"