Re: DBD::Pg's $dbh->func( "/path/to/file", 'lo_import' ) fails silently - Mailing list pgsql-general

From Greg Sabino Mullane
Subject Re: DBD::Pg's $dbh->func( "/path/to/file", 'lo_import' ) fails silently
Date
Msg-id ae993afe19e36722e9d2a09905951b8f@biglumber.com
Whole thread Raw
In response to Re: DBD::Pg`s $dbh->func( "/path/to/file", `lo_import` ) fails silently  (Kynn Jones <kynnjo@gmail.com>)
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


> Actually, after much trial and error I figured out the problem: the handle I
> was using had AutoCommit set.  I'm new to the lo_* functions, and not aware
> of this issue.  A mention of this in the DBD::Pg docs would be very helpful
> to LO noobs like me.

Ah, that clears things up. Definitely a multi-part bug on our part. I've updated
the DBD::Pg docs to mention that the large object functions will not work if
AutoCommit is enabled. The dbdpg code now throws an error if the functions are
called while in the AutoCommit state. However, I also carved out exceptions for
lo_import and lo_export: they are atomic, so no reason why they should not work
even with AutoCommit! All of this will be in the next release of DBD::Pg,
version 2.11.9, which should be released in the next few days. I also opened a
bug for this, which is now the best place to track the issue:

https://rt.cpan.org/Ticket/Display.html?id=44461

Thanks for reporting this and for following up once discovering the AutoCommit part.

- --
Greg Sabino Mullane greg@turnstep.com
End Point Corporation
PGP Key: 0x14964AC8 200903220006
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAknFuhgACgkQvJuQZxSWSshcTACdH93UwJxRhF8WcXxcAjffecmw
tzYAoMd7GvHBHrAXitro+r4QwRMkRDhS
=iM63
-----END PGP SIGNATURE-----



pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Srf function : missing library on PostgreSQL 8.3.6 on Windows?
Next
From: RebeccaJ
Date:
Subject: text column constraint, newbie question