-# $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.62 2006/09/08 13:32:26 meskes Exp $
+# $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.63 2007/01/12 11:27:28 meskes Exp $
subdir = src/interfaces/ecpg/test
top_builddir = ../../../..
all install installdirs uninstall dep depend distprep:
$(MAKE) -C connect $@
+ $(MAKE) -C expected $@
$(MAKE) -C sql $@
$(MAKE) -C pgtypeslib $@
$(MAKE) -C preproc $@
clean distclean maintainer-clean:
$(MAKE) -C connect $@
$(MAKE) -C connect extraclean
+ $(MAKE) -C expected extraclean
$(MAKE) -C sql $@
$(MAKE) -C pgtypeslib $@
$(MAKE) -C preproc $@
--- /dev/null
+subdir = src/interfaces/ecpg/test/expected
+top_builddir = ../../../../..
+include $(top_builddir)/src/Makefile.global
+include $(top_srcdir)/$(subdir)/../Makefile.regress
+
+# port number for temp-installation test postmaster
+# this is also defined in ../Makefile
+TEMP_PORT = 5$(DEF_PGPORT)
+
+connect-test1.c: connect-test1.c.in
+ sed -e 's,@TEMP_PORT@,$(TEMP_PORT),g' \
+ $< >$@
+
+all: connect-test1.c
+
+extraclean:
+ rm -f connect-test1.c
+
-
-THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT
-
[NO_PID]: ECPGdebug: set to 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <DEFAULT>
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: Connection main closed.
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGconnect: opening database connectdb on localhost port 55432
+[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT>
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: Connection main closed.
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port 55432 for user connectdb
+[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port <REGRESSION_PORT> for user connectdb
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: Connection main closed.
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port 55432
+[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <REGRESSION_PORT>
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: Connection main closed.
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGconnect: opening database <DEFAULT> on <DEFAULT> port 55432 for user connectdb
+[NO_PID]: ECPGconnect: opening database <DEFAULT> on <DEFAULT> port <REGRESSION_PORT> for user connectdb
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: Connection main closed.
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGconnect: opening database connectdb on localhost port 55432 for user connectuser
+[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT> for user connectuser
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: Connection connectdb closed.
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGconnect: opening database on localhost port 55432 for user connectdb
+[NO_PID]: ECPGconnect: opening database on localhost port <REGRESSION_PORT> for user connectdb
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: Connection closed.
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGconnect: opening database connectdb on localhost port 55432 for user connectuser
+[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT> for user connectuser
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: Connection connectdb closed.
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port 55432 for user connectuser
+[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <REGRESSION_PORT> for user connectuser
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: Connection connectdb closed.
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port 55432 for user connectuser
+[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <REGRESSION_PORT> for user connectuser
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: Connection connectdb closed.
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGconnect: opening database nonexistant on localhost port 55432 for user connectuser
+[NO_PID]: ECPGconnect: opening database nonexistant on localhost port <REGRESSION_PORT> for user connectuser
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: connect: could not open database nonexistant on localhost port 55432 for user connectuser in line 62
+[NO_PID]: connect: could not open database nonexistant on localhost port <REGRESSION_PORT> for user connectuser in line 62
FATAL: database "nonexistant" does not exist
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: -402, state: 08001
[NO_PID]: raising sqlcode -220 in line 63, 'No such connection CURRENT in line 63.'.
[NO_PID]: sqlca: code: -220, state: 08003
-[NO_PID]: ECPGconnect: opening database connectdb on localhost port 20 for user connectuser
+[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT> for user connectuser
[NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: connect: could not open database connectdb on localhost port 20 for user connectuser in line 66
+[NO_PID]: connect: could not open database connectdb on localhost port <REGRESSION_PORT> for user connectuser in line 66
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" and accepting
TCP/IP connections on port 20?
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: raising sqlcode -402 in line 66, 'Could not connect to database connectdb in line 66.'.
[NO_PID]: sqlca: code: -402, state: 08001
-[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port 55432 for user connectuser
+[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <REGRESSION_PORT> for user connectuser
[NO_PID]: sqlca: code: 0, state: 00000
#line 30 "test1.pgc"
- { ECPGconnect(__LINE__, 0, "connectdb@localhost:55432" , NULL,NULL , "main", 0); }
+ { ECPGconnect(__LINE__, 0, "connectdb@localhost:@TEMP_PORT@" , NULL,NULL , "main", 0); }
#line 32 "test1.pgc"
{ ECPGdisconnect(__LINE__, "main");}
#line 33 "test1.pgc"
- { ECPGconnect(__LINE__, 0, "@localhost:55432" , "connectdb" , NULL , "main", 0); }
+ { ECPGconnect(__LINE__, 0, "@localhost:@TEMP_PORT@" , "connectdb" , NULL , "main", 0); }
#line 35 "test1.pgc"
{ ECPGdisconnect(__LINE__, "main");}
#line 36 "test1.pgc"
- { ECPGconnect(__LINE__, 0, "connectdb:55432" , NULL,NULL , "main", 0); }
+ { ECPGconnect(__LINE__, 0, "connectdb:@TEMP_PORT@" , NULL,NULL , "main", 0); }
#line 38 "test1.pgc"
{ ECPGdisconnect(__LINE__, "main");}
#line 39 "test1.pgc"
- { ECPGconnect(__LINE__, 0, ":55432" , "connectdb" , NULL , "main", 0); }
+ { ECPGconnect(__LINE__, 0, ":@TEMP_PORT@" , "connectdb" , NULL , "main", 0); }
#line 41 "test1.pgc"
{ ECPGdisconnect(__LINE__, "main");}
#line 42 "test1.pgc"
- { ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:55432/connectdb" , "connectuser" , "connectpw" , NULL, 0); }
+ { ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:@TEMP_PORT@/connectdb" , "connectuser" , "connectpw" , NULL, 0); }
#line 44 "test1.pgc"
{ ECPGdisconnect(__LINE__, "CURRENT");}
#line 45 "test1.pgc"
- { ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:55432/" , "connectdb" , NULL , NULL, 0); }
+ { ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:@TEMP_PORT@/" , "connectdb" , NULL , NULL, 0); }
#line 47 "test1.pgc"
{ ECPGdisconnect(__LINE__, "CURRENT");}
strcpy(pw, "connectpw");
- strcpy(db, "tcp:postgresql://localhost:55432/connectdb");
+ strcpy(db, "tcp:postgresql://localhost:@TEMP_PORT@/connectdb");
{ ECPGconnect(__LINE__, 0, db , "connectuser" , pw , NULL, 0); }
#line 52 "test1.pgc"
#line 53 "test1.pgc"
- { ECPGconnect(__LINE__, 0, "unix:postgresql://localhost:55432/connectdb" , "connectuser" , "connectpw" , NULL, 0); }
+ { ECPGconnect(__LINE__, 0, "unix:postgresql://localhost:@TEMP_PORT@/connectdb" , "connectuser" , "connectpw" , NULL, 0); }
#line 55 "test1.pgc"
{ ECPGdisconnect(__LINE__, "CURRENT");}
#line 56 "test1.pgc"
- { ECPGconnect(__LINE__, 0, "unix:postgresql://localhost:55432/connectdb" , "connectuser" , NULL , NULL, 0); }
+ { ECPGconnect(__LINE__, 0, "unix:postgresql://localhost:@TEMP_PORT@/connectdb" , "connectuser" , NULL , NULL, 0); }
#line 58 "test1.pgc"
{ ECPGdisconnect(__LINE__, "CURRENT");}
/* wrong db */
- { ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:55432/nonexistant" , "connectuser" , "connectpw" , NULL, 0); }
+ { ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:@TEMP_PORT@/nonexistant" , "connectuser" , "connectpw" , NULL, 0); }
#line 62 "test1.pgc"
{ ECPGdisconnect(__LINE__, "CURRENT");}
/* no disconnect necessary */
/* wrong password */
- { ECPGconnect(__LINE__, 0, "unix:postgresql://localhost:55432/connectdb" , "connectuser" , "wrongpw" , NULL, 0); }
+ { ECPGconnect(__LINE__, 0, "unix:postgresql://localhost:@TEMP_PORT@/connectdb" , "connectuser" , "wrongpw" , NULL, 0); }
#line 70 "test1.pgc"
/* no disconnect necessary */