PyGreSQL and Unlinking Large Objects - Mailing list pgsql-interfaces

From Paul Tevis
Subject PyGreSQL and Unlinking Large Objects
Date
Msg-id 20011025165849.B25657@blaze.ghs.com
Whole thread Raw
List pgsql-interfaces
Can anyone see why this code shouldn't work?
   FID = 1    connection = pg.connect(dbname="validations-test")   connection.query("BEGIN")   result =
connection.query("SELECT oid FROM failures WHERE fid=%d" %
 
FID )   assert len(result.getresult()) == 1   oid = result.getresult()[0][0]   object = connection.getlo(oid)
object.unlink()  connection.query( "DELETE FROM failures WHERE fid=%d" % FID)   connection.query("COMMIT")
 



On the delete query I get "NOTICE:  current transaction is aborted,
queries ignored until end of transaction block".

If I switch the order of the unlink and the delete, I get no such
message, but in neither case is the large object deleted. I actually
can't large objects to delete under any circumstances. Has anyone else
seen this behavior?

Thanks,

--Paul

Paul Tevis
Compiler Engineer
Green Hills Software


pgsql-interfaces by date:

Previous
From: Christof Petig
Date:
Subject: Re: ECPG: Automatic Storage allocation for NULL-pointing
Next
From: "BinYang"
Date:
Subject: Installation Problem