Re: Re: Re: Storing images in PG?

Поиск
Список
Период
Сортировка
От Gunnar Rønning
Тема Re: Re: Re: Storing images in PG?
Дата
Msg-id m27kw4s0vj.fsf@smaug.polygnosis.com
обсуждение исходный текст
Ответ на RE: Re: Re: Storing images in PG?  ("Eric Ridge" <ebr@tcdi.com>)
Список pgsql-general
* "Eric Ridge" <ebr@tcdi.com> wrote:

|
| 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?

It would be convenient to have fast access to binary data in the database
that is similar to what other databases do. This would allow more
applications to run on PostgreSQL.

Not everybody will have the opportunity to access the local filesystem, e.g.
ISPs providing servlet hosting will likely turn of access to the filesystem.

It is also more work to write code to manage files in the filesystem. Why
store pointers to the actual files in the database, if I can store the
files themselves there.

As for speed of access you could always provide a cache for the images
in your application.


I've done the pointer to filesystem type of implementation in a CMS
system before and that turned out be messy to manage. E.g. If the disk is
full when adding a image, rollback transaction. What if some ignorant user
messes up the files ? Access control to the images, for that we need to
go through the application anyway.



--
Gunnar Rønning - gunnar@polygnosis.com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Roll Back dont roll back counters
Следующее
От: "Richard Huxton"
Дата:
Сообщение: Re: Roll Back dont roll back counters