Skip site navigation (1) Skip section navigation (2)

PyGreSQL and Unlinking Large Objects

From: Paul Tevis <ptevis(at)ghs(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: PyGreSQL and Unlinking Large Objects
Date: 2001-10-25 23:58:49
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
Can anyone see why this code shouldn't work?

    FID = 1 
    connection = pg.connect(dbname="validations-test")
    result = connection.query( "SELECT oid FROM failures WHERE fid=%d" %
    assert len(result.getresult()) == 1
    oid = result.getresult()[0][0]
    object = connection.getlo(oid)
    connection.query( "DELETE FROM failures WHERE fid=%d" % FID)

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?



Paul Tevis
Compiler Engineer
Green Hills Software

pgsql-interfaces by date

Next:From: Michael MeskesDate: 2001-10-26 05:59:30
Subject: Re: ECPG: Automatic Storage allocation for NULL-pointing output variables
Previous:From: Peter EisentrautDate: 2001-10-25 18:32:30
Subject: Re: Python interface and Money?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group