Thread: Storing Graphic Files

Storing Graphic Files

From
"Mills, Wallace"
Date:
I am trying to sort out how one can store and retrieve graphic files when
using Postgresql. From reading the docs and other material I have been able
to find, it would appear as though to store images they have to be stored as
Largew Objects. My problem is that I can not get my head around how this is
accomplished. I would appreciate it if someone could explain in simple terms
(or even an example) how to accomplish the storing/retrieving of images in
the database.
Thanks in advance.

Wallace Mills


********************************DISCLAIMER****************************
The information contained in the above e-mail message or messages
(which includes any attachments) is confidential and may be legally
privileged.  It is intended only for the use of the person or entity
to which it is addressed.  If you are not the addressee any form of
disclosure, copying, modification, distribution or any action taken
or omitted in reliance on the information is unauthorised.  Opinions
contained in the message(s) do not necessarily reflect the opinions
of the Queensland Government and its authorities.  If you received
this communication in error, please notify the sender immediately and
delete it from your computer system network.


Re: Storing Graphic Files

From
Louis Bertrand
Date:
You can play around with large objects from the command line in psql.
See the \lo_* commands in the psql man page:
 http://www.postgresql.org/users-lounge/docs/7.0/user/app-psql.htm

I use them from the PHP interface, and it's quite nice to use:
 get your object's OID, open it like you would a file, access it with
the file handle, then close it.
I'm not sure about the other programming interfaces, but I don't expect it
would be much different.

Ciao
 --Louis  <louis@bertrandtech.on.ca>


OpenBSD: Secure by default.  http://www.openbsd.org/

On Mon, 15 Jan 2001, Mills, Wallace wrote:

> I am trying to sort out how one can store and retrieve graphic files when
> using Postgresql. From reading the docs and other material I have been able
> to find, it would appear as though to store images they have to be stored as
> Largew Objects. My problem is that I can not get my head around how this is
> accomplished. I would appreciate it if someone could explain in simple terms
> (or even an example) how to accomplish the storing/retrieving of images in
> the database.
> Thanks in advance.
>
> Wallace Mills
>
>
> ********************************DISCLAIMER****************************
> The information contained in the above e-mail message or messages
> (which includes any attachments) is confidential and may be legally
> privileged.  It is intended only for the use of the person or entity
> to which it is addressed.  If you are not the addressee any form of
> disclosure, copying, modification, distribution or any action taken
> or omitted in reliance on the information is unauthorised.  Opinions
> contained in the message(s) do not necessarily reflect the opinions
> of the Queensland Government and its authorities.  If you received
> this communication in error, please notify the sender immediately and
> delete it from your computer system network.
>
>