Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
ac03efbb
Commit
ac03efbb
authored
Dec 01, 2008
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed port testing.
parent
6355e69d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
130 deletions
+43
-130
src/interfaces/ecpg/test/Makefile
src/interfaces/ecpg/test/Makefile
+3
-10
src/interfaces/ecpg/test/connect/Makefile
src/interfaces/ecpg/test/connect/Makefile
+0
-12
src/interfaces/ecpg/test/connect/test1.pgc
src/interfaces/ecpg/test/connect/test1.pgc
+9
-18
src/interfaces/ecpg/test/expected/Makefile
src/interfaces/ecpg/test/expected/Makefile
+0
-18
src/interfaces/ecpg/test/expected/connect-test1.c
src/interfaces/ecpg/test/expected/connect-test1.c
+21
-46
src/interfaces/ecpg/test/expected/connect-test1.stderr
src/interfaces/ecpg/test/expected/connect-test1.stderr
+10
-26
No files found.
src/interfaces/ecpg/test/Makefile
View file @
ac03efbb
# $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.7
4 2008/11/28 23:47:51 tgl
Exp $
# $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.7
5 2008/12/01 11:37:37 meskes
Exp $
subdir
=
src/interfaces/ecpg/test
top_builddir
=
../../../..
include
$(top_builddir)/src/Makefile.global
# port number for temp-installation test postmaster
# this is also defined in test/connect/Makefile
TEMP_PORT
=
4
$(DEF_PGPORT)
# where to find psql for testing an existing installation
PSQLDIR
=
$(bindir)
...
...
@@ -37,7 +33,6 @@ REGRESSDRIVER = "$(top_builddir)/src/test/regress/pg_regress.o"
all install installdirs uninstall distprep
:
$(MAKE)
-C
connect
$@
$(MAKE)
-C
expected
$@
$(MAKE)
-C
sql
$@
$(MAKE)
-C
pgtypeslib
$@
$(MAKE)
-C
preproc
$@
...
...
@@ -46,8 +41,6 @@ all install installdirs uninstall distprep:
clean distclean maintainer-clean
:
$(MAKE)
-C
connect
$@
$(MAKE)
-C
connect extraclean
$(MAKE)
-C
expected extraclean
$(MAKE)
-C
sql
$@
$(MAKE)
-C
pgtypeslib
$@
$(MAKE)
-C
preproc
$@
...
...
@@ -88,11 +81,11 @@ endif
check
:
all
./pg_regress
--dbname
=
regress1,connectdb
--top-builddir
=
$(top_builddir)
--temp-install
=
./tmp_check
--
port
=
$(TEMP_PORT)
--
multibyte
=
$(MULTIBYTE)
--load-language
=
plpgsql
$(NOLOCALE)
$(THREAD)
--schedule
=
$(srcdir)
/ecpg_schedule
--create-role
=
connectuser,connectdb
./pg_regress
--dbname
=
regress1,connectdb
--top-builddir
=
$(top_builddir)
--temp-install
=
./tmp_check
--multibyte
=
$(MULTIBYTE)
--load-language
=
plpgsql
$(NOLOCALE)
$(THREAD)
--schedule
=
$(srcdir)
/ecpg_schedule
--create-role
=
connectuser,connectdb
# the same options, but with --listen-on-tcp
checktcp
:
all
./pg_regress
--dbname
=
regress1,connectdb
--top-builddir
=
$(top_builddir)
--temp-install
=
./tmp_check
--
port
=
$(TEMP_PORT)
--
multibyte
=
$(MULTIBYTE)
--load-language
=
plpgsql
$(NOLOCALE)
$(THREAD)
--schedule
=
$(srcdir)
/ecpg_schedule_tcp
--create-role
=
connectuser,connectdb
--host
=
localhost
./pg_regress
--dbname
=
regress1,connectdb
--top-builddir
=
$(top_builddir)
--temp-install
=
./tmp_check
--multibyte
=
$(MULTIBYTE)
--load-language
=
plpgsql
$(NOLOCALE)
$(THREAD)
--schedule
=
$(srcdir)
/ecpg_schedule_tcp
--create-role
=
connectuser,connectdb
--host
=
localhost
installcheck
:
all
./pg_regress
--psqldir
=
$(PSQLDIR)
--dbname
=
regress1,connectdb
--top-builddir
=
$(top_builddir)
--multibyte
=
$(MULTIBYTE)
--load-language
=
plpgsql
$(NOLOCALE)
$(THREAD)
--schedule
=
$(srcdir)
/ecpg_schedule
--create-role
=
connectuser,connectdb
src/interfaces/ecpg/test/connect/Makefile
View file @
ac03efbb
...
...
@@ -3,16 +3,6 @@ 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
=
4
$(DEF_PGPORT)
test1.pgc
:
test1.pgc.in
sed
-e
's,@TEMP_PORT@,
$(TEMP_PORT)
,g'
\
$<
>
$@
sed
-e
's,@TEMP_PORT@,
$(TEMP_PORT)
,g'
\
$(top_srcdir)
/
$(subdir)
/../expected/connect-test1.c.in
>
../expected/connect-test1.c
TESTS
=
test1 test1.c
\
test2 test2.c
\
test3 test3.c
\
...
...
@@ -21,5 +11,3 @@ TESTS = test1 test1.c \
all
:
$(TESTS)
extraclean
:
rm
-f
test1.pgc
src/interfaces/ecpg/test/connect/test1.pgc
.in
→
src/interfaces/ecpg/test/connect/test1.pgc
View file @
ac03efbb
...
...
@@ -29,37 +29,28 @@ exec sql end declare section;
exec sql connect to @localhost as main user connectdb;
exec sql disconnect main;
exec sql connect to connectdb@localhost:@TEMP_PORT@ as main;
exec sql disconnect main;
exec sql connect to @localhost:@TEMP_PORT@ as main user connectdb;
exec sql disconnect main;
exec sql connect to connectdb:@TEMP_PORT@ as main;
exec sql disconnect main;
exec sql connect to :@TEMP_PORT@ as main user connectdb;
exec sql disconnect main;
/* exec sql connect to :@TEMP_PORT@ as main user connectdb;
exec sql disconnect main; */
exec sql connect to tcp:postgresql://localhost
:@TEMP_PORT@
/connectdb user connectuser identified by connectpw;
exec sql connect to tcp:postgresql://localhost/connectdb user connectuser identified by connectpw;
exec sql disconnect;
exec sql connect to tcp:postgresql://localhost
:@TEMP_PORT@
/ user connectdb;
exec sql connect to tcp:postgresql://localhost/ user connectdb;
exec sql disconnect;
strcpy(pw, "connectpw");
strcpy(db, "tcp:postgresql://localhost
:@TEMP_PORT@
/connectdb");
strcpy(db, "tcp:postgresql://localhost/connectdb");
exec sql connect to :db user connectuser using :pw;
exec sql disconnect;
exec sql connect to unix:postgresql://localhost
:@TEMP_PORT@
/connectdb user connectuser using "connectpw";
exec sql connect to unix:postgresql://localhost/connectdb user connectuser using "connectpw";
exec sql disconnect;
exec sql connect to unix:postgresql://localhost
:@TEMP_PORT@
/connectdb?connect_timeout=14 user connectuser;
exec sql connect to unix:postgresql://localhost/connectdb?connect_timeout=14 user connectuser;
exec sql disconnect;
/* wrong db */
exec sql connect to tcp:postgresql://localhost
:@TEMP_PORT@
/nonexistant user connectuser identified by connectpw;
exec sql connect to tcp:postgresql://localhost/nonexistant user connectuser identified by connectpw;
exec sql disconnect;
/* wrong port */
...
...
@@ -67,7 +58,7 @@ exec sql end declare section;
/* no disconnect necessary */
/* wrong password */
exec sql connect to unix:postgresql://localhost
:@TEMP_PORT@
/connectdb user connectuser identified by "wrongpw";
exec sql connect to unix:postgresql://localhost/connectdb user connectuser identified by "wrongpw";
/* no disconnect necessary */
return (0);
...
...
src/interfaces/ecpg/test/expected/Makefile
deleted
100644 → 0
View file @
6355e69d
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
src/interfaces/ecpg/test/expected/connect-test1.c
.in
→
src/interfaces/ecpg/test/expected/connect-test1.c
View file @
ac03efbb
...
...
@@ -60,88 +60,63 @@ main(void)
#line 30 "test1.pgc"
{ ECPGconnect(__LINE__, 0, "connectdb@localhost:@TEMP_PORT@" , NULL, NULL , "main", 0); }
#line 32 "test1.pgc"
/* exec sql connect to :@TEMP_PORT@ as main user connectdb;
exec sql disconnect main; */
{ ECPGdisconnect(__LINE__, "main");}
#line 33 "test1.pgc"
{ ECPGconnect(__LINE__, 0, "@localhost:@TEMP_PORT@" , "connectdb" , NULL , "main", 0); }
{
ECPGconnect
(
__LINE__
,
0
,
"tcp:postgresql://localhost/connectdb"
,
"connectuser"
,
"connectpw"
,
NULL
,
0
);
}
#line 35 "test1.pgc"
{ ECPGdisconnect(__LINE__, "
main
");}
{
ECPGdisconnect
(
__LINE__
,
"
CURRENT
"
);}
#line 36 "test1.pgc"
{ ECPGconnect(__LINE__, 0, "
connectdb:@TEMP_PORT@" , NULL, NULL , "main"
, 0); }
{
ECPGconnect
(
__LINE__
,
0
,
"
tcp:postgresql://localhost/"
,
"connectdb"
,
NULL
,
NULL
,
0
);
}
#line 38 "test1.pgc"
{ ECPGdisconnect(__LINE__, "main");}
#line 39 "test1.pgc"
{ 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:@TEMP_PORT@/connectdb" , "connectuser" , "connectpw" , NULL, 0); }
#line 44 "test1.pgc"
{ ECPGdisconnect(__LINE__, "CURRENT");}
#line 45 "test1.pgc"
{ ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:@TEMP_PORT@/" , "connectdb" , NULL , NULL, 0); }
#line 47 "test1.pgc"
{
ECPGdisconnect
(
__LINE__
,
"CURRENT"
);}
#line
48
"test1.pgc"
#line
39
"test1.pgc"
strcpy
(
pw
,
"connectpw"
);
strcpy(db, "tcp:postgresql://localhost
:@TEMP_PORT@
/connectdb");
strcpy
(
db
,
"tcp:postgresql://localhost/connectdb"
);
{
ECPGconnect
(
__LINE__
,
0
,
db
,
"connectuser"
,
pw
,
NULL
,
0
);
}
#line
52
"test1.pgc"
#line
43
"test1.pgc"
{
ECPGdisconnect
(
__LINE__
,
"CURRENT"
);}
#line
53
"test1.pgc"
#line
44
"test1.pgc"
{ ECPGconnect(__LINE__, 0, "unix:postgresql://localhost
:@TEMP_PORT@
/connectdb" , "connectuser" , "connectpw" , NULL, 0); }
#line
55
"test1.pgc"
{
ECPGconnect
(
__LINE__
,
0
,
"unix:postgresql://localhost/connectdb"
,
"connectuser"
,
"connectpw"
,
NULL
,
0
);
}
#line
46
"test1.pgc"
{
ECPGdisconnect
(
__LINE__
,
"CURRENT"
);}
#line
56
"test1.pgc"
#line
47
"test1.pgc"
{ ECPGconnect(__LINE__, 0, "unix:postgresql://localhost
:@TEMP_PORT@
/connectdb?connect_timeout=14" , "connectuser" , NULL , NULL, 0); }
#line
58
"test1.pgc"
{
ECPGconnect
(
__LINE__
,
0
,
"unix:postgresql://localhost/connectdb?connect_timeout=14"
,
"connectuser"
,
NULL
,
NULL
,
0
);
}
#line
49
"test1.pgc"
{
ECPGdisconnect
(
__LINE__
,
"CURRENT"
);}
#line 5
9
"test1.pgc"
#line 5
0
"test1.pgc"
/* wrong db */
{ ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost
:@TEMP_PORT@
/nonexistant" , "connectuser" , "connectpw" , NULL, 0); }
#line
62
"test1.pgc"
{
ECPGconnect
(
__LINE__
,
0
,
"tcp:postgresql://localhost/nonexistant"
,
"connectuser"
,
"connectpw"
,
NULL
,
0
);
}
#line
53
"test1.pgc"
{
ECPGdisconnect
(
__LINE__
,
"CURRENT"
);}
#line
63
"test1.pgc"
#line
54
"test1.pgc"
/* wrong port */
{
ECPGconnect
(
__LINE__
,
0
,
"tcp:postgresql://localhost:20/connectdb"
,
"connectuser"
,
"connectpw"
,
NULL
,
0
);
}
#line
66
"test1.pgc"
#line
57
"test1.pgc"
/* no disconnect necessary */
/* wrong password */
{ ECPGconnect(__LINE__, 0, "unix:postgresql://localhost
:@TEMP_PORT@
/connectdb" , "connectuser" , "wrongpw" , NULL, 0); }
#line
70
"test1.pgc"
{
ECPGconnect
(
__LINE__
,
0
,
"unix:postgresql://localhost/connectdb"
,
"connectuser"
,
"wrongpw"
,
NULL
,
0
);
}
#line
61
"test1.pgc"
/* no disconnect necessary */
...
...
src/interfaces/ecpg/test/expected/connect-test1.stderr
View file @
ac03efbb
...
...
@@ -18,52 +18,36 @@
[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 <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 <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 <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 <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 <REGRESSION_PORT> for user connectuser
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <DEFAULT> 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 <DEFAULT> on localhost port <
REGRESSION_POR
T> for user connectdb
[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port <
DEFAUL
T> for user connectdb
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: connection (null) closed
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <
REGRESSION_POR
T> for user connectuser
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <
DEFAUL
T> 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 <
REGRESSION_POR
T> for user connectuser
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <
DEFAUL
T> 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 <
REGRESSION_POR
T> with options connect_timeout=14 for user connectuser
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <
DEFAUL
T> with options connect_timeout=14 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 <
REGRESSION_POR
T> for user connectuser
[NO_PID]: ECPGconnect: opening database nonexistant on localhost port <
DEFAUL
T> for user connectuser
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: could not open database: FATAL: database "nonexistant" does not exist
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: connection nonexistant closed
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: raising sqlcode -402 on line
62: could not connect to database "nonexistant" on line 62
[NO_PID]: raising sqlcode -402 on line
53: could not connect to database "nonexistant" on line 53
[NO_PID]: sqlca: code: -402, state: 08001
[NO_PID]: raising sqlcode -220 on line
63: no such connection CURRENT on line 63
[NO_PID]: raising sqlcode -220 on line
54: no such connection CURRENT on line 54
[NO_PID]: sqlca: code: -220, state: 08003
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT> for user connectuser
[NO_PID]: sqlca: code: 0, state: 00000
...
...
@@ -74,7 +58,7 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: connection connectdb closed
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: raising sqlcode -402 on line
66: could not connect to database "connectdb" on line 66
[NO_PID]: raising sqlcode -402 on line
57: could not connect to database "connectdb" on line 57
[NO_PID]: sqlca: code: -402, state: 08001
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <
REGRESSION_POR
T> for user connectuser
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <
DEFAUL
T> for user connectuser
[NO_PID]: sqlca: code: 0, state: 00000
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment