Received: from connectnet2.connectnet.com (spool.connectnet.com [207.110.0.12]) by hub.org (8.9.3/8.9.3) with ESMTP id VAA92730 for ; Fri, 14 Jan 2000 21:51:33 -0500 (EST) (envelope-from bbaldwin@indyme.com) Received: from INDYMEEXCH.INDY.COM (indymemail.indyme.com [207.110.14.226]) by connectnet2.connectnet.com (8.9.1/CONNECTnet-4.0/THROTTLE) with ESMTP id SAA19919 for ; Fri, 14 Jan 2000 18:51:40 -0800 (PST) Received: by INDYMEEXCH with Internet Mail Service (5.5.2650.21) id ; Fri, 14 Jan 2000 18:50:54 -0800 Message-ID: <319A9588FB5ED2119FAC00A0C912E3292786D7@INDYMEEXCH> From: Barry Baldwin To: pgsql-interfaces@postgresql.org Subject: Inserting a BLOB Date: Fri, 14 Jan 2000 18:50:53 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Hi all, I'm trying to use BLOB's in a database that I'm creating. This database will be connected to a Delphi app via ODBC. I've create a data type lo like the ODBC faq says to do. create type lo ( internallength=4, externallength=10, input=int4in, output=int4out, default=' ', passedbyvalue ); and I've created a table that uses the above type lo. Now I would like to manually enter data into the database through psql. How do I insert an image file? I've tried : Insert into picture_tbl (pic_id, image) values(1, lo_import('/home/images/pic_1.jpg')); This doesn't work because lo_import returns a type of oid. I must be missing something very obvious. Any help or suggestions would be very appreciated, TIA, Barry