Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: jack-rt-cpan-org [...] mudshark.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.48
Fixed in: 2.0.0



Subject: DBD::Pg::db last_insert_id failed: no statement executing
Hello, following the example in the documentation, when I try and do a: ----------- my $sth=$dbh->prepare("INSERT into foo (bar,blah,baz) VALUES (?,?,?);"); $sth->execute( 'XXX', 'XXX', 'XXX'); my $newid = $dbh->last_insert_id(undef,undef,"foo",undef); print "Last insert id was $newid\n" if defined $newid; ; ----------- I get the error message; DBD::Pg::db last_insert_id failed: no statement executing This is with Linux RHEL 3, DBI: 1.50, DBD::Pg 1.48, postgres 7.3.4, perl 5.6.1.
Subject: Re: [Dbdpg-general] [rt.cpan.org #18597] DBD::Pg::db last_insert_id failed: no statement executing
Date: Sun, 9 Apr 2006 20:56:15 -0000
To: bug-DBD-Pg [...] rt.cpan.org
From: greg [...] turnstep.com
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Show quoted text
> I get the error message; > > DBD::Pg::db last_insert_id failed: no statement executing
I could not duplicate this. Could you send the complete code, especially the table definition? A self-enclosed testing script that shows the problem would be ideal. Show quoted text
> This is with Linux RHEL 3, DBI: 1.50, DBD::Pg 1.48, postgres 7.3.4, perl > 5.6.1.
Please note that support for 7.3 may end soon in DBD::Pg (and in Postgres itself). At the very least, you should upgrade right away to a higher version of the 7.3 branch - it is currently up to 7.3.14, and some serious bugs are in the 7.3.4 version. - -- Greg Sabino Mullane greg@turnstep.com PGP Key: 0x14964AC8 200604091653 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -----BEGIN PGP SIGNATURE----- iD4DBQFEOXRkvJuQZxSWSsgRAhalAJjxpvb2tIeiN3+SCYMY5AcMFbtzAKCtbn4r KR/eTmrj86nn9eZzDj/uZQ== =xp79 -----END PGP SIGNATURE-----
From: ivan.wills [...] gmail.com
Just to add to this I get the same error with CentOS, Perl 5.8.6 DB::Pg 1.43 and 1.49 and PostgreSQL 8.1.4. Interestingly I only get the error for tables in one schema.
This should be fixed, please try in the latest subversion version if you can.