Inserting a BLOB

From: Barry Baldwin <bbaldwin(at)indyme(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Inserting a BLOB
Date: 2000-01-15 02:50:53
Message-ID: 319A9588FB5ED2119FAC00A0C912E3292786D7@INDYMEEXCH
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-interfaces by date

  From Date Subject
Next Message Ronald Hoellwarth 2000-01-15 21:45:30 Re: [INTERFACES] Forms too complex or to large in pgaccess?
Previous Message Assaf Arkin 2000-01-14 22:19:54 Re: [INTERFACES] JDBC 2.0 Standard Extensions for PostgreSQL