RE: Re: Re: Storing images in PG?

Поиск
Список
Период
Сортировка
От Eric Ridge
Тема RE: Re: Re: Storing images in PG?
Дата
Msg-id D3ADE25911614840BC69C72E3171E4ED0280B8@tcdiexch.tcdi.com
обсуждение исходный текст
Ответ на Storing images in PG?  ("Dr. Evil" <drevil@sidereal.kz>)
Ответы Re: Re: Re: Storing images in PG?  (Gunnar Rønning <gunnar@polygnosis.com>)
Список 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@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


В списке pgsql-general по дате отправления:

Предыдущее
От: Justin Clift
Дата:
Сообщение: PostgreSQL buffer exploits
Следующее
От: "Andrew SNow"
Дата:
Сообщение: RE: Re: Storing images in PG?