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 (?)
pgsql-novice by date
|Next:||From: M Spreij||Date: 2003-07-24 20:46:36|
|Subject: Re: Questions about Exists-Not exists clause|
|Previous:||From: Tom Lane||Date: 2003-07-24 14:06:30|
|Subject: Re: question about images |