From: | Andreas Kostyrka <andreas(at)ag(dot)or(dot)at> |
---|---|
To: | pygresql(at)vex(dot)net |
Cc: | pgsql-sql(at)postgreSQL(dot)org |
Subject: | Large Objects, anyone? |
Date: | 1998-11-27 19:51:56 |
Message-ID: | Pine.LNX.3.96.981127204838.652A-100000@lifesaver |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hi!
I'm having problems with postgresql 6.3.2 (RH 5.x vintage). The following
program should probably work, but it doesn't:
import pg,sys,string
c=pg.connect("test",None,-1,None,None)
if len(sys.argv)==1:
c.query("BEGIN")
lo=c.locreate(pg.INV_READ|pg.INV_WRITE)
lo.open(pg.INV_WRITE)
lo.write("TESTing")
lo.close()
# lo=c.loimport("/etc/sendmail.cf")
print lo.oid
c.query("END;")
else:
c.query("BEGIN")
lo=c.getlo(string.atoi(sys.argv[1]))
lo.open(pg.INV_READ)
print lo.read(102400)
c.query("END;")
The funny thing is, that the object is created, but the lo.write() seems
to be ignored :(
BUT when using loimport, the contents get into the db.
Even more fun, the testlo.c example in the postgresql source core dumps on
the PQexec("end") line :(
Andreas
--
Win95: n., A huge annoying boot virus that causes random spontaneous system
crashes, usually just before saving a massive project. Easily cured by
UNIX. See also MS-DOS, IBM-DOS, DR-DOS, Win 3.x, Win98.
From | Date | Subject | |
---|---|---|---|
Next Message | Frank Morton | 1998-11-29 05:43:49 | alter help needed |
Previous Message | Sferacarta Software | 1998-11-27 12:23:31 | Re: [SQL] Typecasting datetype as date. How do I cope with NULLs? |