pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Barry Baldwin <bbaldwin@indyme.com>
To: pgsql-interfaces@postgresql.org
Subject: Inserting a BLOB
Date: Fri, 14 Jan 2000 18:50:53 -0800
Message-ID: <319A9588FB5ED2119FAC00A0C912E3292786D7@INDYMEEXCH> (raw)

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




Message-ID: <319A9588FB5ED2119FAC00A0C912E3292786D7@INDYMEEXCH>
Permalink:  ../319A9588FB5ED2119FAC00A0C912E3292786D7@INDYMEEXCH/
Also on:    postgresql.org/message-id/319A9588FB5ED2119FAC00A0C912E3292786D7@INDYMEEXCH

 · 

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-interfaces@postgresql.org
  Cc: bbaldwin@indyme.com
  Subject: Re: Inserting a BLOB
  In-Reply-To: <319A9588FB5ED2119FAC00A0C912E3292786D7@INDYMEEXCH>
  References: <319A9588FB5ED2119FAC00A0C912E3292786D7@INDYMEEXCH>

* 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