Subject: | Bug in column_info: quotes not removed |
If a field name is a reserved word for postgres (eg: 'location'),
postgres will put double-quotes around it in the output of pg_dump, and
DBD::Pg will do it in the results of a column_info() call.
As functions like selectrow_hashref don't seem to have the
double-quotes, a problem occurs when you're using column_info to set up
web page fields (mainly their widths) for selectrow_hashref to fill in:
the hash keys won't match. (location != "location")
If you could remove the quotes around field names in the column_info()
call, that'd be great! I'm currently using this code to do it:
foreach (keys %result) {
if (m/"/) {
my $n=$_;
$n=~s/"//g;
$result{$n}=$result{$_};
delete $result{$_};
}
}
Thanks!