pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Somashekharayya V H <shekhar@easi.soft.net>
To: pgsql-sql@postgresql.org
Subject: Inserting BLOB
Date: Tue, 13 Feb 2001 18:10:53 +0530
Message-ID: <3A892B55.FD428B5D@easi.soft.net> (raw)

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





Message-ID: <3A892B55.FD428B5D@easi.soft.net>
Permalink:  ../3A892B55.FD428B5D@easi.soft.net/
Also on:    postgresql.org/message-id/3A892B55.FD428B5D@easi.soft.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: shekhar@easi.soft.net
  Subject: Re: Inserting BLOB
  In-Reply-To: <3A892B55.FD428B5D@easi.soft.net>
  References: <3A892B55.FD428B5D@easi.soft.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox