Display large object from database - Mailing list pgsql-novice

From Greg
Subject Display large object from database
Date
Msg-id 000101c6889b$98dee250$ca9ca6f0$@co.za
Whole thread Raw
Responses Re: Display large object from database  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Creating users with name and email
Next
From: Tom Lane
Date:
Subject: Re: Display large object from database