From: | <Herbert(dot)Liechti(at)thinx(dot)ch> |
---|---|
To: | <wsheldah(at)lexmark(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Large objects in web applications |
Date: | 2001-06-26 16:34:28 |
Message-ID: | Pine.LNX.4.33.0106261829320.19914-100000@standbyme.thinx.ch |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 26 Jun 2001 wsheldah(at)lexmark(dot)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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From | Date | Subject | |
---|---|---|---|
Next Message | Philip Molter | 2001-06-26 16:37:59 | Adding a NOT NULL column? |
Previous Message | Bruce Momjian | 2001-06-26 16:24:12 | Re: More Red Hat information |