On Tue, 26 Jun 2001 wsheldah@lexmark.com wrote:
>
> Has there been any substantial change in the way large objects are handled with
> the coming of 7.1 and the expanded row size limit? Some old online articles
> suggested that would change things, but the current docs seem say I still need
> to use functions like lo_import.
For large text objects you may use the toast feature in 7.1 where the
length of a text field is no longer limited
>
> Assuming things haven't changed for large objects, it appears that to display an
> image, I'll need to:
> 1. select the image from postgresql, using lo_export() to save it to a uniquely
> named temp file (to avoid conflicts with other users).
> 2. Read/load the temp file and send it out to the browser.
> 3. Delete the temp file
I do this directly by using the blob_read interface of the DBD::Pg library
and then just printing out the blob with the appropriate mimetype. You
may refer in the <IMG> tag a script instead of a cooked file.
If you like to have an example please contact me directly because this
mailing list is not Perl related.
Best regards
Herbie
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Herbert Liechti http://www.thinx.ch
ThinX networked business services Adlergasse 5, CH-4500 Solothurn
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~