summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/test
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2000-02-14 10:00:06 +0000
committerMichael Meskes <meskes@postgresql.org>2000-02-14 10:00:06 +0000
commit08b999f1bd5f1aa0ca0da07fa4d5410708ab94d8 (patch)
tree18b49a215b623195e41e8cc8e5d47ee084517e75 /src/interfaces/ecpg/test
parent9672d38f91f908e8a314d2f4500d9ec6b24d3b02 (diff)
downloadpostgresql-08b999f1bd5f1aa0ca0da07fa4d5410708ab94d8.tar.gz
*** empty log message ***
Diffstat (limited to 'src/interfaces/ecpg/test')
-rw-r--r--src/interfaces/ecpg/test/stp.pgc10
-rw-r--r--src/interfaces/ecpg/test/test5.pgc1
2 files changed, 10 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/test/stp.pgc b/src/interfaces/ecpg/test/stp.pgc
index 6021ae0db4..a069077bf0 100644
--- a/src/interfaces/ecpg/test/stp.pgc
+++ b/src/interfaces/ecpg/test/stp.pgc
@@ -5,9 +5,19 @@ int my_fun (void)
EXEC SQL BEGIN DECLARE SECTION;
int sql_index = 0;
EXEC SQL END DECLARE SECTION;
+ FILE *dbgs;
+
+ if ((dbgs = fopen("/tmp/log", "w")) != NULL)
+ ECPGdebug(1, dbgs);
EXEC SQL WHENEVER SQLERROR GOTO Error;
+
+ EXEC SQL CONNECT TO 'mm';
EXEC SQL SELECT MIN(index) INTO :sql_index FROM tab;
+ EXEC SQL DISCONNECT;
+
+ if (dbgs != NULL)
+ fclose(dbgs);
return (sql_index);
diff --git a/src/interfaces/ecpg/test/test5.pgc b/src/interfaces/ecpg/test/test5.pgc
index 1e0c60c4dd..3c8c4249c1 100644
--- a/src/interfaces/ecpg/test/test5.pgc
+++ b/src/interfaces/ecpg/test/test5.pgc
@@ -13,7 +13,6 @@ int main (void)
EXEC SQL END DECLARE SECTION;
FILE *dbgs;
-
if ((dbgs = fopen("log", "w")) != NULL)
ECPGdebug(1, dbgs);