[DBD::Pg] 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
dbdpg-commits-gENoVmVU/[email protected] Thu, 25 Sep 2014 21:03:33 +0000
| Newsgroups | gmane.comp.db.postgresql.dbdpg.cvs |
|---|---|
| Message-ID | <[email protected]> |
Committed by Greg Sabino Mullane <greg-O9fzpki4YnJWk0Htik3J/[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