Inserting BLOB

From: Somashekharayya V H <shekhar(at)easi(dot)soft(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Inserting BLOB
Date: 2001-02-13 12:40:53
Message-ID: 3A892B55.FD428B5D@easi.soft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi all,
I am using following query to create new type 'lo'
create type lo
(internallength=4,externallength=10,input=int4in,output=int4out,
default='',passedbyvalue);

i am trying to insert the image by following query:
insert into table (user_id,image) values
('som',lo_import('/u/grms/Import/XYZ.jpg'));

Here lo_import is used for oid but above type is 'lo' .
It is saying to cast the expression .

Tried by following query also.
insert into table (user_id,image) values ('som','XYZ.jpg');

But it is throwing pg_attoi error : can't parse ' XYZ.jpg'

Could anybody reply earliest with proper queries to insert, update and
delete an image from database.(Postgresql 7.0.0)
(with the help of lo type only)

thanks in advance,
som

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Momjian 2001-02-13 14:56:27 Re: C/C++ interface
Previous Message Volker Paul 2001-02-13 12:10:27 C/C++ interface