Blob stuff
| От | Patrick Nelson |
|---|---|
| Тема | Blob stuff |
| Дата | |
| Msg-id | 4165C48DE9A0D211B6400800095C585F172E0E@WASHINGTON обсуждение исходный текст |
| Ответы |
Re: Blob stuff
|
| Список | 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 по дате отправления: