Skip Menu |

This queue is for tickets about the DBD-Pg CPAN distribution.

Report information
The Basics
Id: 18133
Status: resolved
Priority: 0/
Queue: DBD-Pg

People
Owner: Nobody in particular
Requestors: hertzog [...] debian.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Doesn't handle some explicit conversion anymore
This snipped of code used to work but doesn't since several versions : use DBI; my $dbh = DBI->connect( 'DBI:Pg:host=localhost', undef,undef, { RaiseError => 1 }); my $sth = $dbh->prepare('select interval ?'); $sth->execute( '1 hour' ); You get the following error : DBD::Pg::st execute failed: ERROR: syntax error at or near "$1" at character 17 This bug has been reported initially in the Debian Bug Tracking System: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=321917 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=315708
This is due to the fact that instead of emulating placeholders, DBD::Pg now uses the internal Postgres prepared statements. This means that only statements that are valid to Postgres can be used: your example was not one of them. To get the old behavior, you can set $dbh->{pg_server_prepare} = 0;