From: | Patrick Nelson <pnelson(at)neatech(dot)com> |
---|---|
To: | "PostgreSQL List (E-mail)" <pgsql-general(at)postgresql(dot)org> |
Subject: | Blob stuff |
Date: | 2002-08-13 18:01:39 |
Message-ID: | 4165C48DE9A0D211B6400800095C585F172E0E@WASHINGTON |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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?
From | Date | Subject | |
---|---|---|---|
Next Message | Ian Harding | 2002-08-13 18:03:01 | Re: Transaction Exception Question |
Previous Message | strange | 2002-08-13 17:45:59 | Re: [HACKERS] Linux Largefile Support In Postgresql RPMS |