Re: Can I Save images in postgres?

From: 纪晓曦 <sheepjxx(at)gmail(dot)com>
To: Yaroslav Tykhiy <yar(at)barnet(dot)com(dot)au>
Cc: John R Pierce <pierce(at)hogranch(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Can I Save images in postgres?
Date: 2009-09-09 03:36:03
Message-ID: 37a11ce00909082036s5cb072afg95bdd42e73905ef3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you very much. It seems it is better to save it on file system.

2009/9/9 Yaroslav Tykhiy <yar(at)barnet(dot)com(dot)au>

> On 09/09/2009, at 10:43 AM, John R Pierce 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.
>>
>
> By the way, here's a relatively recent discussion of this issue:
>
> http://archives.postgresql.org/pgsql-general/2009-06/msg00599.php
>
> Yar

In response to

Browse pgsql-general by date

  From Date Subject
Next Message miller_2555 2009-09-09 04:40:24 Re: Using symbolic links with tablespaces
Previous Message Tom Lane 2009-09-09 03:13:59 Re: Using symbolic links with tablespaces