Inserting a BLOB - Mailing list pgsql-interfaces

From Barry Baldwin
Subject Inserting a BLOB
Date
Msg-id 319A9588FB5ED2119FAC00A0C912E3292786D7@INDYMEEXCH
Whole thread Raw
List pgsql-interfaces
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



pgsql-interfaces by date:

Previous
From: Robert Hiltibidal
Date:
Subject: Special Characters
Next
From: Michael Meskes
Date:
Subject: Re: [INTERFACES] Setup of PGAdmin