X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9F9085288B for ; Wed, 18 May 2005 20:07:36 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 00530-10 for ; Wed, 18 May 2005 23:07:34 +0000 (GMT) Received: from brasil.brainstorm.fr (brasil.brainstorm.fr [193.56.58.33]) by svr1.postgresql.org (Postfix) with ESMTP id 10D2052890 for ; Wed, 18 May 2005 20:07:33 -0300 (ADT) Received: by brasil.brainstorm.fr (Postfix, from userid 1005) id 70D0426B08D; Thu, 19 May 2005 01:07:34 +0200 (CEST) Content-Type: text/plain; charset="iso-8859-15" Content-Disposition: inline Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Mailer: Manitou v0.9.6 From: "Daniel Verite" Subject: Re: perl and large objects To: "pgsql-interfaces" In-Reply-To: <9ba996673af22c512313dc025914263a@mail.nih.gov> Date: Thu, 19 May 2005 01:07:27 +0200 Message-Id: <20050519010331.7693010@localhost> X-Face: 0N#]; "Miw2ss`WySq(ZLLy[=.ai4D}yI#'n*PU:{%/ZVSUd*G$EuN$v@TyBnpW5x=-m*Jc?Cm&=kXN#l; pePLb!,P.9D4M]fHU+XMPTe(>>'( X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/40 X-Sequence-Number: 5543 Sean Davis wrote: > I am new to large objects and have a simple test script that dies (at > the lo_import line) and I don't know why (no descriptive error given). > Any suggestions (or a quick tutorial)? The DBD manual just wasn't > quite enough for me, I guess. The lack of error message feels like what happens when you call lo_* functions outside of a transaction. IIRC you just get 0 as the resulting oid to a lo_import, for instance. You could try adding $dbh->do("select 1") just after $dbh->{AutoCommit}=0 to ensure that a transaction is started before the lo_import. Also, your code snippet runs fine for me, unmodified, with DBD::Pg 1.21 Are you running an older version? -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org