Blob stuff - Mailing list pgsql-general

From Patrick Nelson
Subject Blob stuff
Date
Msg-id 4165C48DE9A0D211B6400800095C585F172E0E@WASHINGTON
Whole thread Raw
Responses Re: Blob stuff
List pgsql-general
OK maybe I'm cutting new ground and no one has or knows how to utilize blob
data.

On a remote client the proper way to insert a blob into the table is:

1. copy myblob.gif (through ftp or scp) to the server to a predefined
directory <PreDir>
2. use INSERT INTO mytable VALUES (lo_import('<PreDir>/myblob.gif'));
3. use SELECT lo_export(mycol, '<OutDir>/myblob.gif') FROM mytable WHERE
<criteria for myblob.gif>;
4. To unlink use SELECT lo_unlink(mycol) FROM mytable WHERE <criteria for
myblob.gif>;
5. copy myblob.gif (through ftp or scp) from the server back to the remote
cliet

Any comments?

There is \lo_import, \lo_export, \lo_list, and \lo_unlink which seem to
utilize a remote client to upload, but this isn't a great solution if your
not using psql.  Even if you do use psql, I'm not sure how to include the
lo_<command> into a db solution.  Any comments?

pgsql-general by date:

Previous
From: strange@nsk.yi.org
Date:
Subject: Re: [HACKERS] Linux Largefile Support In Postgresql RPMS
Next
From: "Ian Harding"
Date:
Subject: Re: Transaction Exception Question