Display large object from database

Поиск
Список
Период
Сортировка
От Greg
Тема Display large object from database
Дата
Msg-id 000101c6889b$98dee250$ca9ca6f0$@co.za
обсуждение исходный текст
Ответы Re: Display large object from database  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice

I am using pgSQL 8.1.4. I have a table that stores pictures, using an oid column.

Now using the SQL functions provided I have successfully saved an image to the table, and managed to export it from the table again.

 

I am battling to open the image for reading into a stream.  The mentioned functions support opening for exporting a file in SQL are

SELECT lo_export(image.raster, '/tmp/motd') FROM image
    WHERE name = 'beautiful image';

But how do I open a stream for reading?

inv_fd = lo_open(conn, inv_oid, INV_READ|INV_WRITE);
 
I have tried to convert this into a SQL statement but INV_READ is not seen as an accepted parameter.

 

В списке pgsql-novice по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Creating users with name and email
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Display large object from database