pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Sullivan <ajs@crankycanuck.ca>
To: pgsql-sql@postgresql.org
Subject: Re: Storage of Binary Data
Date: Thu, 27 Jul 2006 14:03:29 -0400
Message-ID: <20060727180329.GF27075@phlogiston.dyndns.org> (raw)
In-Reply-To: <bf05e51c0607251005i58e836b7u51f411e103c242@mail.gmail.com>
References: <bf05e51c0607251005i58e836b7u51f411e103c242@mail.gmail.com>

> For my web projects, we have been storing binary data (like images, PDF's,
> etc) on the hard drive of the web server instead of the database.  Within
> the database, we keep information, like whether an image is present, in a
> separate column.

In most cases, this is probably the best approach.  It has the
problem that COMMITs of this data aren't atomic (the file write could
succeed and the database write fail, for example).  But that can
usually be worked around, and at least you're not bulking your
database with binaries.

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca
This work was visionary and imaginative, and goes to show that visionary
and imaginative work need not end up well. 
		--Dennis Ritchie



view thread (2+ messages)

Message-ID: <20060727180329.GF27075@phlogiston.dyndns.org>
Permalink:  ../20060727180329.GF27075@phlogiston.dyndns.org/
Also on:    postgresql.org/message-id/20060727180329.GF27075@phlogiston.dyndns.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ajs@crankycanuck.ca
  Subject: Re: Storage of Binary Data
  In-Reply-To: <20060727180329.GF27075@phlogiston.dyndns.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox