Author: turnstep
Date: Tue Jun 9 05:47:49 2009
New Revision: 12818
Modified:
DBD-Pg/trunk/t/03dbmethod.t
DBD-Pg/trunk/t/12placeholders.t
Log:
Don't assume existing databases have a 'public' schema.
Modified: DBD-Pg/trunk/t/03dbmethod.t
==============================================================================
--- DBD-Pg/trunk/t/03dbmethod.t (original)
+++ DBD-Pg/trunk/t/03dbmethod.t Tue Jun 9 05:47:49 2009
@@ -159,7 +159,7 @@
$dbh->commit();
$dbh->do("SELECT setval('$schema2.$sequence2',200)");
$dbh->do("SELECT setval('$schema.$sequence4',100)");
-$dbh->do("SET search_path = $schema,$schema2,public");
+$dbh->do("SET search_path = $schema,$schema2");
eval {
$result = $dbh->last_insert_id(undef,undef,$table2,undef,{pg_cache=>0});
};
@@ -168,7 +168,7 @@
$t='search_path respected when using last_insert_id with no cache (second
table)';
$dbh->commit();
-$dbh->do("SET search_path = $schema2,$schema,public");
+$dbh->do("SET search_path = $schema2,$schema");
eval {
$result = $dbh->last_insert_id(undef,undef,$table2,undef,{pg_cache=>0});
};
@@ -176,7 +176,7 @@
is ($result, 200, $t);
$t='Setting cache on (explicit) returns last result, even if search_path
changes';
-$dbh->do("SET search_path = $schema,$schema2,public");
+$dbh->do("SET search_path = $schema,$schema2");
eval {
$result = $dbh->last_insert_id(undef,undef,$table2,undef,{pg_cache=>1});
};
@@ -184,7 +184,7 @@
is ($result, 200, $t);
$t='Setting cache on (implicit) returns last result, even if search_path
changes';
-$dbh->do("SET search_path = $schema,$schema2,public");
+$dbh->do("SET search_path = $schema,$schema2");
eval {
$result = $dbh->last_insert_id(undef,undef,$table2,undef);
};
Modified: DBD-Pg/trunk/t/12placeholders.t
==============================================================================
--- DBD-Pg/trunk/t/12placeholders.t (original)
+++ DBD-Pg/trunk/t/12placeholders.t Tue Jun 9 05:47:49 2009
@@ -143,7 +143,7 @@
$sth->finish();
$dbh->commit();
eval {
- $dbh->do(q{SET search_path TO ?}, undef, 'public');
+ $dbh->do(q{SET search_path TO ?}, undef, 'pg_catalog');
};
is ($@, q{}, $t);
@@ -165,7 +165,7 @@
$dbh->commit();
eval {
$sth = $dbh->prepare(q{SET search_path TO ?});
- $sth->execute('public');
+ $sth->execute('pg_catalog');
};
is ($@, q{}, $t);