Re: Can I Save images in postgres?

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Can I Save images in postgres?
Date: 2009-09-15 11:57:04
Message-ID: h8nveg$cg5$2@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2009-09-09, John R Pierce <pierce(at)hogranch(dot)com> wrote:
> 纪晓曦 wrote:
>> Can I save images in the postgres? How to define? Does the format
>> matters? Can I save JPG/PNG?How?
>
> you can save images as BYTEA data, and the format is totally up to your
> application, as postgres just treats it as a block of bytes. however,
> I generally find it easier to store my images on a file system, and just
> put the file path in the database.

storing images in the database is useful when providing filesystem
access to a shared location is inconvenient, and also helps with data
integrity.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Inigo Barandiaran 2009-09-15 13:08:37 Re: Regarding initdb & pg_ctl
Previous Message Jasen Betts 2009-09-15 11:53:48 Re: Can I Save images in postgres?