RE: Re: Re: Storing images in PG?

From: "Eric Ridge" <ebr(at)tcdi(dot)com>
To: "Andrew SNow" <andrew(at)modulus(dot)org>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: RE: Re: Re: Storing images in PG?
Date: 2001-08-16 09:32:24
Message-ID: D3ADE25911614840BC69C72E3171E4ED0280B8@tcdiexch.tcdi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> only, a problem can be 30% grow of data... (you can use
> "lztext" that is compressed datype:-).

Alternativly, you can store "pointers" to the images in the database.
Such as a local filepath or url (file:///usr/local/myimages/foo.gif or
ftp://user:passwd(at)host/pub/myimages/foo.gif). Then you could use wget
to get the file bytes for you.

The nice thing about doing this is that you don't need to store images
and data on the same server. It gives you room to expand your storage.
It also improves performance b/c I'm sure FTP or a local file copy is
more efficient than the Postgres network protocol. Plus, no need to
encode and constantly decode the bytes.

Also, if you're not going to be searching the bytes of the file (which
I'm sure you're not), why put it in the database?

eric

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew SNow 2001-08-16 09:59:04 RE: Re: Storing images in PG?
Previous Message Justin Clift 2001-08-16 09:27:18 PostgreSQL buffer exploits