From: | John DeSoi <desoi(at)pgedit(dot)com> |
---|---|
To: | "littlebutty" <littlebutty(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: storing PDFs |
Date: | 2006-01-01 15:36:21 |
Message-ID: | 3BA40F9B-A26F-4DB4-8847-C427CE5569F9@pgedit.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Dec 29, 2005, at 5:45 PM, littlebutty wrote:
> I have written software that will dynamically create PDF documents
> used
> within my web application. Because each document is unique, I would
> like to store the resultant PDF into a field of the DB. Currently I
> just store the file to the server's hard drive and insert a path to
> the
> file the database, but I would like to also store the actual file
> itself in a field for redundancy purposes and other business reasons.
> I am curious to know what everyone thinks would be the best way to
> store PDF files in postgres??
The BYTEA type works for this purpose. In cases where the content can
be easily regenerated, I have also found it useful to put these
columns in tables within a separate schema and reference them from
the primary table with the details about the document. This allows
the database to be dumped without the large bytea fields which makes
daily backups smaller and easier to manage.
John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL
From | Date | Subject | |
---|---|---|---|
Next Message | Leonel Nunez | 2006-01-01 15:47:10 | Re: storing PDFs |
Previous Message | Larry Rosenman | 2006-01-01 15:35:06 | Re: storing PDFs |