Committed by Greg Sabino Mullane <[email protected]>
In table_info, make sure non-quoted types get passed
through the chain. Previously we merely did the quote with an unless, which
means items failing that were not passed on but merely sent as a a "1"
RT#99144
---
Pg.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Pg.pm b/Pg.pm
index 76ed8a1..a4924bf 100644
--- a/Pg.pm
+++ b/Pg.pm
@@ -1137,7 +1137,7 @@ use 5.008001;
if (defined($type) and length($type) and $type ne '%') {
my $type_restrict = join ', ' =>
- map { $dbh->quote($_) unless /^'/ }
+ map { /^'/ ? $_ : $dbh->quote($_) }
grep {length}
split(',', $type);
$tbl_sql = qq{SELECT * FROM ($tbl_sql) ti WHERE "TABLE_TYPE"
IN ($type_restrict)};
--
1.8.4