Skip Menu |

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

Report information
The Basics
Id: 18035
Status: rejected
Priority: 0/
Queue: DBD-Pg

People
Owner: JBAKER [...] cpan.org
Requestors: nonsolosoft [...] diff.org
Cc:
AdminCc:

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



Subject: dollar numbered placeholders
DBI::VERSION:1.50 DBD::Pg::VERSION:1.45 DBD::Pg::st execute failed: called with 2 bind variables when 0 are needed at /home/fer/test.pl line 13.
Subject: test.pl
#!/usr/bin/perl #!/usr/bin/perl use DBI; print "DBI::VERSION:" . $DBI::VERSION; my $dbh=DBI->connect("dbi:Pg:dbname=template1", "pgsql", "", {AutoCommit => 0}); print "\nDBD::Pg::VERSION:" . $DBD::Pg::VERSION ."\n"; my $sth=$dbh->prepare(qq(SELECT count(*) FROM pg_class WHERE relpages BETWEEN $1 AND $2)); $sth->execute(100,105);
From: nonsolosoft [...] diff.org
On Mar. 07 Mar. 2006 07:36:08, guest wrote: Show quoted text
> DBI::VERSION:1.50 > DBD::Pg::VERSION:1.45
Following is the output of: my $sth=$dbh->prepare(qq( SELECT count(*) FROM pg_class WHERE relpages BETWEEN $1 AND $2 )); $sth->execute(100,105); Just as from DBD::Pg docs. Show quoted text
> DBD::Pg::st execute failed: called with 2 bind variables when 0 are > needed at /home/fer/test.pl line 13.
With PostgreSQL 8.0.3 and 8.1.x
Subject: Re: [rt.cpan.org #18035] dollar numbered placeholders
Date: Tue, 07 Mar 2006 14:44:39 -0800
To: bug-DBD-Pg [...] rt.cpan.org
From: "Jeffrey W. Baker" <jwbaker [...] acm.org>
On Tue, 2006-03-07 at 17:37 -0500, Guest via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=18035 > > > On Mar. 07 Mar. 2006 07:36:08, guest wrote:
> > DBI::VERSION:1.50 > > DBD::Pg::VERSION:1.45
> > Following is the output of: > my $sth=$dbh->prepare(qq( > SELECT count(*) FROM pg_class WHERE relpages BETWEEN $1 AND $2 > )); > > $sth->execute(100,105); > > Just as from DBD::Pg docs. >
> > DBD::Pg::st execute failed: called with 2 bind variables when 0 are > > needed at /home/fer/test.pl line 13.
> > With PostgreSQL 8.0.3 and 8.1.x
This is not a bug, it's a user error. You cannot use a bare dollar sign inside double quotes (qq) in perl. -jwb
Subject: Re: [rt.cpan.org #18035] dollar numbered placeholders
Date: Wed, 08 Mar 2006 00:27:07 +0100
To: bug-DBD-Pg [...] rt.cpan.org
From: Ferruccio Zamuner <nonsolosoft [...] diff.org>
Jeffrey W. Baker via RT wrote: Show quoted text
> This is not a bug, it's a user error. You cannot use a bare dollar sign > inside double quotes (qq) in perl. > > -jwb
Gosp, you right! Sorry, I've discovered that I'd to sleep more. I hope you don't blame me. Thank you, \fer