Received: from stud3.tuwien.ac.at (root@stud3.tuwien.ac.at [193.170.75.13]) by hub.org (8.9.1/8.9.1) with ESMTP id PAA29119 for ; Fri, 27 Nov 1998 15:16:50 -0500 (EST) (envelope-from andreas@ag.or.at) Received: from lifesaver.mtg.co.at (e46.dialin.tuwien.ac.at [192.35.243.236]) by stud3.tuwien.ac.at (8.8.6/8.8.6) with ESMTP id VAA11241; Fri, 27 Nov 1998 21:16:40 +0100 (MET) Received: from localhost (andreas@localhost) by lifesaver.mtg.co.at (8.8.7/8.8.5) with SMTP id UAA00675; Fri, 27 Nov 1998 20:51:56 +0100 X-Authentication-Warning: lifesaver.mtg.co.at: andreas owned process doing -bs Date: Fri, 27 Nov 1998 20:51:56 +0100 (CET) From: Andreas Kostyrka X-Sender: andreas@lifesaver Reply-To: Andreas Kostyrka To: pygresql@vex.net cc: pgsql-sql@postgreSQL.org Subject: Large Objects, anyone? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.