Re: [GENERAL] BLOBS from psql... - Mailing list pgsql-general

From Peter T Mount
Subject Re: [GENERAL] BLOBS from psql...
Date
Msg-id Pine.LNX.3.96.981104064954.814q-100000@maidast.retep.org.uk
Whole thread Raw
In response to BLOBS from psql...  (A James Lewis <james@vrtx.net>)
List pgsql-general
On Wed, 4 Nov 1998, A James Lewis wrote:

>
>
> Is there any way to enter a large object (Binary) into a database using
> psql... or any other tool I can run from a shell script...

There are the lo_import and lo_export functions, but the file has to be on
the backend for them.

> Ideally I need to be able to take stdin and put it in a particular place
> in a table....  Then obviously get it back out later...

The easiest way is to write a small client using libpq that does it for
you.

I'm thinking on the lines of:

$> blob -i <my-src-file

and

$> blob -o >my-dest-file

It's been a while since I've used libpq, but there are some examples you
could hack to do this in the source tree.

--
       Peter T Mount peter@retep.org.uk
      Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
 Java PDF Generator: http://www.retep.org.uk/pdf


pgsql-general by date:

Previous
From: Peter T Mount
Date:
Subject: Re: [GENERAL] Support for images?
Next
From: "rex"
Date:
Subject: compile