Re: bytea / large object and image

From: "Joshua D(dot) Drake" <jdrake(at)postgresql(dot)org>
To: "Raymond O'Donnell" <rod(at)iol(dot)ie>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: bytea / large object and image
Date: 2006-11-04 18:43:07
Message-ID: 454CDF3B.5020903@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Raymond O'Donnell wrote:
> On 4 Nov 2006 at 18:24, Alain Roger wrote:
>
>> However, i've read that before i must restore the image by exporting
>> them to local (on server) file.
>
> You can use bytea type to store binary data directly in the database -
> if it's any use to you, I can send you some ASP code that does this.

bytea is not always a good idea. It depends on the size of the data you
are storing. If you are storing pretty much anything greater than 200k I
would suggest moving to pg_largeobject instead.

Joshua D. Drake

>
> There was a thread recently on the merits of doing it this way, as
> opposed to storing the image on the filesystem and keeping just
> metadata in the DB - you'll find it in the archives.
>
> --Ray.
>
>
>
> ----------------------------------------------------------------------
>
> Raymond O'Donnell
> Director of Music, Galway Cathedral, Galway, Ireland
> rod(at)iol(dot)ie
> ----------------------------------------------------------------------
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

--

SPI Liason, PostgreSQL Fundraising Group
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
Find out about PostgreSQL Fundraising: http://fundraising.postgresql.org/
Read the PostgreSQL docs: http://www.postgresql.org/docs/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tomas Vondra 2006-11-04 18:50:13 Re: bytea / large object and image
Previous Message Raymond O'Donnell 2006-11-04 18:38:20 Re: bytea / large object and image