RT issue #44461 (lo functions and AutoCommit)

"Daniel Verite" <[email protected]>
Newsgroups gmane.comp.db.postgresql.dbdpg
Message-ID <07c91055-0e6c-43b3-bf22-5cf9dd9bea6a@mm>
  Hi,

About the issue mentioned here:
https://rt.cpan.org/Public/Bug/Display.html?id=44461
and the corresponding fix, I'd like to point out that it may break 
existing code. For instance, consider this sequence of instructions:

$dbh->{AutoCommit}=1;
$dbh->do("BEGIN");
my $oid=$dbh->func($file, 'lo_import');
# other things...
$dbh->do("ROLLBACK");

With the current version of DBD::Pg I have (2.8.2), it outputs no error 
and rollbacks the lo_import (no new entry gets created in 
pg_largeobject)

But with the latest SVN, it outputs these messages:
  WARNING:  there is already a transaction in progress
  NOTICE:  there is no transaction in progress
and the lo_import gets committed instead of rolled back.

Best regards,

-- 
 Daniel
 PostgreSQL-powered mail user agent and storage:
 http://www.manitou-mail.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.