Received: from easi.soft.net. (server.easi.soft.net [164.164.23.5]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1DCUgx70803 for ; Tue, 13 Feb 2001 07:30:44 -0500 (EST) (envelope-from shekhar@easi.soft.net) Received: from easi.soft.net (pcl50.easi.soft.net [100.0.0.150]) by easi.soft.net. (8.8.8/8.8.8) with ESMTP id SAA18500 for ; Tue, 13 Feb 2001 18:01:33 +0530 Message-ID: <3A892B55.FD428B5D@easi.soft.net> Date: Tue, 13 Feb 2001 18:10:53 +0530 From: Somashekharayya V H Reply-To: shekhar@easi.soft.net Organization: Easi X-Mailer: Mozilla 4.7 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Inserting BLOB Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200102/245 X-Sequence-Number: 1436 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