Re: data-type for image files

From: john-paul delaney <jp(at)justatest(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: data-type for image files
Date: 2002-05-16 09:19:55
Message-ID: Pine.LNX.4.21.0205160657580.5852-100000@justatest.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hello... I had a similar question, for use with jdbc. If you're running postgresql version 7.2.1 (not sure if this type is fully supported in earlier versions), there is also the bytea type for storing binary data.

See the followng link:
http://www.postgresql.org/idocs/index.php?jdbc-binary-data.html

/j-p.

On Wed, 15 May 2002, Josh Berkus wrote:

>
> Sibu,
>
> > I would like to know if there is a data type for file such as image files.
> > In otherwords is there a straignt forward way to place references to
> > images-files in a postgres table. I notice there is a network datatype
> (cidr
> > or inet). If an image file is stored at host://someplace/image for example
> > can this 'address' be used as a datatype (i.e. a pointers in the
> > table..... ?
>
> Your basic options are these:
> 1. Use a BLOB datatype to store the images directly in the database.
> 2. Use filesystem pointers to store the image in a file, which is retrievable
> through your interface code.
>
> For a variety of reasons, I prefer 2. However, the BLOB approach as strong
> adherents. See the Postgres docs for more info:
> http://www.us.postgresql.org/users-lounge/docs/7.2/postgres/largeobjects.html
>
> -Josh Berkus
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

-----------------------
JUSTATEST Art Online
www.justatest.com

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Rasputin 2002-05-16 11:29:03 7.2 startup with md5 pass?
Previous Message Tom Lane 2002-05-16 04:32:50 Re: Trouble with index in 7.1