Re: Picture with Postgres and Delphi

From: "Darko Prenosil" <Darko(dot)Prenosil(at)finteh(dot)hr>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Picture with Postgres and Delphi
Date: 2003-09-09 20:41:51
Message-ID: 003b01c37713$12d32fa0$ae96bfd5@darko
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


----- Original Message -----
From: "listy.mailowe" <listy(dot)mailowe(at)wp(dot)pl>
To: <pgsql-general(at)postgresql(dot)org>
Sent: Tuesday, September 09, 2003 8:10 PM
Subject: Re: [GENERAL] Picture with Postgres and Delphi

> Hi,
>
> Edwin Quijada wrote:
>
> > Hi !! Everybody
> > I am developing app using Delphi and I have a question:
> > I have to save pictures into my database. Each picture has 20 o 30k
aprox.
> > What is the way more optimus?
> > That 's table will have 500000 records around. Somebody said the best
way to
> > do that was encoder the picture to field bytea but I dont know about
this.
> > Another way is save the path to the picture file but I dont like so much
> > because I need to write to disk by OS and have permission to write a
> > directory to OS.
> > What do u think??
> >
> Yes, generally you have two choices, but you can as well store data in
> files and get it by stored procedures... Any way I did it with FTP (Indy
> component). It allowed me to cache files locally.
>
There is no need for manually storing files on filesystem, because large
objects are doing that for You. I am storing whole binary files in
blobs(synonym for large objects from some other platforms), and I do not
remember that I had a single problem with that. Do not forget that libpq has
great support for large objects, and you can store large object without
actually storing them on server filesystem, so You do not need any file
permissions on "upload directory" or something like that.
If You are using Delphi, there is great project called "Zeos objects", and
if I remember correctly it has support for large objects.

Regards !

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-09-09 20:55:01 Re: Kill -9 Postmaster and Temporary Tables
Previous Message Darko Prenosil 2003-09-09 20:31:23 Re: Picture with Postgres and Delphi