Re: Re: Re: Storing images in PG? - Mailing list pgsql-general

From Gunnar Rønning
Subject Re: Re: Re: Storing images in PG?
Date
Msg-id m27kw4s0vj.fsf@smaug.polygnosis.com
Whole thread Raw
In response to RE: Re: Re: Storing images in PG?  ("Eric Ridge" <ebr@tcdi.com>)
List 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 by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Roll Back dont roll back counters
Next
From: "Richard Huxton"
Date:
Subject: Re: Roll Back dont roll back counters