[DBD::Pg] Fix operator existence check in tests on pre-8.3 servers
[email protected] Sun, 8 Feb 2015 01:52:14 +0000
| Newsgroups | perl.dbd.pg.changes |
|---|---|
| Message-ID | <[email protected]> |
Committed by =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <[email protected]> Fix operator existence check in tests on pre-8.3 servers Before 8.3 there's no cast from regtype to text, so cast the parameter to regtype instead. --- t/dbdpg_test_setup.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/dbdpg_test_setup.pl b/t/dbdpg_test_setup.pl index 763a4cd..275e801 100644 --- a/t/dbdpg_test_setup.pl +++ b/t/dbdpg_test_setup.pl @@ -829,7 +829,7 @@ sub operator_exists { my $schema = 'dbd_pg_testschema'; my $SQL = 'SELECT 1 FROM pg_operator o, pg_namespace n '. - 'WHERE oprname=? AND oprleft::regtype::text = ? AND oprright::regtype::text = ?'. + 'WHERE oprname=? AND oprleft = ?::regtype AND oprright = ?::regtype'. ' AND o.oprnamespace = n.oid AND n.nspname = ?'; my $sth = $dbh->prepare_cached($SQL); my $count = $sth->execute($opname,$leftarg,$rightarg,$schema); -- 1.8.4