diff options
Diffstat (limited to 'src/interfaces/perl5/eg/example.oldstyle')
-rw-r--r-- | src/interfaces/perl5/eg/example.oldstyle | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/interfaces/perl5/eg/example.oldstyle b/src/interfaces/perl5/eg/example.oldstyle index 7f0f46b6f2d..6c537af1b88 100644 --- a/src/interfaces/perl5/eg/example.oldstyle +++ b/src/interfaces/perl5/eg/example.oldstyle @@ -2,7 +2,7 @@ #------------------------------------------------------- # -# $Id: example.oldstyle,v 1.2 1997/09/25 21:15:04 mergl Exp $ +# $Id: example.oldstyle,v 1.3 1998/02/20 21:26:08 mergl Exp $ # # Copyright (c) 1997 Edmund Mergl # @@ -23,6 +23,7 @@ print "ok 1\n"; $dbmain = 'template1'; $dbname = 'pgperltest'; +$dbhost = 'localhost'; $trace = '/tmp/pgtrace.out'; $cnt = 2; $DEBUG = 0; # set this to 1 for traces @@ -88,7 +89,7 @@ $SIG{PIPE} = sub { print "broken pipe\n" }; ######################### create and connect to test database # 2-4 -$conn = PQsetdb('', '', '', '', $dbmain); +$conn = PQsetdb($dbhost, '', '', '', $dbmain); cmp_eq(PGRES_CONNECTION_OK, PQstatus($conn)); # might fail if $dbname doesn't exist => don't check resultStatus @@ -101,7 +102,7 @@ PQclear($result); PQfinish($conn); -$conn = PQsetdb('', '', '', '', $dbname); +$conn = PQsetdb($dbhost, '', '', '', $dbname); cmp_eq(PGRES_CONNECTION_OK, PQstatus($conn)); ######################### debug, PQtrace @@ -230,7 +231,7 @@ if (! defined($pid = fork)) { } elsif (! $pid) { # i'm the child sleep 2; - $conn = PQsetdb('', '', '', '', $dbname); + $conn = PQsetdb($dbhost, '', '', '', $dbname); $result = PQexec($conn, "NOTIFY person"); PQclear($result); PQfinish($conn); @@ -299,7 +300,7 @@ if ($DEBUG) { PQfinish($conn); -$conn = PQsetdb('', '', '', '', $dbmain); +$conn = PQsetdb($dbhost, '', '', '', $dbmain); cmp_eq(PGRES_CONNECTION_OK, PQstatus($conn)); $result = PQexec($conn, "DROP DATABASE $dbname"); |