Skip site navigation (1) Skip section navigation (2)

Re: question about images

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 (view raw or flat)
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


pgsql-novice by date

Next:From: M SpreijDate: 2003-07-24 20:46:36
Subject: Re: Questions about Exists-Not exists clause
Previous:From: Tom LaneDate: 2003-07-24 14:06:30
Subject: Re: question about images

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group