1 diff -r --unified DBD-Pg-1.00/test.pl DBD-Pg-1.00.alex/test.pl
2 --- DBD-Pg-1.00/test.pl Sun May 27 10:10:13 2001
3 +++ DBD-Pg-1.00.alex/test.pl Sun Jun 10 15:38:09 2001
5 my $dsn_main = "dbi:Pg:dbname=$dbmain";
6 my $dsn_test = "dbi:Pg:dbname=$dbtest";
8 -my ($dbh0, $dbh, $sth);
9 +my ($dbh0, $dbh, $dbh1, $sth);
11 #DBI->trace(3); # make your choice
15 $dbh->{AutoCommit} = 1;
17 +# compare large objects
19 ( $dbh->func($lobjId, 'lo_unlink') )
20 and print "\$dbh->func(lo_unlink) ...... ok\n"
21 or print "\$dbh->func(lo_unlink) ...... not ok\n";
23 -# compare large objects
25 ( $pgin cmp $buf and $pgin cmp $blob )
26 and print "compare blobs .............. not ok\n"
27 or print "compare blobs .............. ok\n";
30 +( $fd=$dbh->func( 'getfd') )
31 + and print "\$dbh->func(getfd) .......... ok\n"
32 + or print "\$dbh->func(getfd) .......... not ok\n";
34 +( $dbh->do( 'LISTEN test ') )
35 + and print "\$dbh->do('LISTEN test') .... ok\n"
36 + or print "\$dbh->do('LISTEN test') .... not ok\n";
38 +( $dbh1 = DBI->connect("$dsn_test", '', '', { AutoCommit => 1 }) )
39 + and print "DBI->connect (for notify)... ok\n"
40 + or die "DBI->connect (for notify)... not ok: ", $DBI::errstr;
42 +# there should be no data for read on $fd , until we send a notify
46 + vec($rin,$fd,1) = 1;
47 + my $nfound = select( $rout=$rin, undef, undef, 0);
50 + and print "select(\$fd) returns no data. ok\n"
51 + or die "select(\$fd) returns no data. not ok\n";
53 +( $dbh1->do( 'NOTIFY test ') )
54 + and print "\$dbh1->do('NOTIFY test') ... ok\n"
55 + or print "\$dbh1->do('NOTIFY test') ... not ok\n";
57 + my $nfound = select( $rout=$rin, undef, undef, 1);
60 + and print "select(\$fd) returns data.... ok\n"
61 + or die "select(\$fd) returns data.... not ok\n";
65 +( $notify_r = $dbh->func('notifies') )
66 + and print "\$dbh->func('notifies')...... ok\n"
67 + or die "\$dbh->func('notifies')...... not ok\n";
69 ######################### disconnect and drop test database
74 and print "\$dbh->disconnect ........... ok\n"
75 or die "\$dbh->disconnect ........... not ok: ", $DBI::errstr;
77 +( $dbh1->disconnect )
78 + and print "\$dbh1->disconnect .......... ok\n"
79 + or die "\$dbh1->disconnect .......... not ok: ", $DBI::errstr;
81 $dbh0->do("DROP DATABASE $dbtest");