From: | Dag Gullberg <dag(dot)gullberg(at)telia(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: question about images |
Date: | 2003-07-24 14:54:33 |
Message-ID: | 03072416543304.01341@hemma |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>Dag Gullberg <dag(dot)gullberg(at)telia(dot)com> writes:
>> I have a problem with understanding how BLOB's
>> work in postgres. It seems as thoug I have to use
>> COPY BINARY table (imagefield) FROM 'absolutepath+imagename' ;
>
>
>No, what you want is lo_import().
>
> regards, tom lane
>
Thanks for the input - and you're right! And wrong!
I first thought of it as a neccessity to have the db to
render me all data in a ''select * from table where id=this_id;''
including image data. I had a problem with the fact that lo_export()
deposit the data on the local fs - anti-constructive if you are trying
to setup a highly distributed and scalable solution. So in that
context you were wrong! Or so I thought...
*But*, thinking about it - the solution is simple - use lo_import and
lo_export as you suggest - and deposit the outdata in a directory
available from a apache-server, serving only image transfers.
I don't know about performance yet, but it is doable -have tested that.
Voila - I'm done (?)
Thanks,
DagG
From | Date | Subject | |
---|---|---|---|
Next Message | M Spreij | 2003-07-24 20:46:36 | Re: Questions about Exists-Not exists clause |
Previous Message | Tom Lane | 2003-07-24 14:06:30 | Re: question about images |