Inserting BLOB - Mailing list pgsql-sql

From Somashekharayya V H
Subject Inserting BLOB
Date
Msg-id 3A892B55.FD428B5D@easi.soft.net
Whole thread Raw
List 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




pgsql-sql by date:

Previous
From: "Richard Huxton"
Date:
Subject: Re: how to select * from database1 table,database2 table
Next
From: "K. Ari Krupnikov"
Date:
Subject: Re: ORDER BY in SQL functions