Re: store pdf files - Mailing list pgsql-sql

From Thomas Kellerer
Subject Re: store pdf files
Date
Msg-id ghmc0m$p4t$1@ger.gmane.org
Whole thread Raw
In response to store pdf files  (ivan marchesini <marchesini@unipg.it>)
List pgsql-sql
ivan marchesini wrote on 09.12.2008 11:11:
> Hi to all...
> I need to create a db that contain link to some pdf files..
> At the moment these are simple links (to the files that are stored into
> the file system) storing paths into a column of a dbf table...
> 
> I need to manage this data considering that the db I'm going to create
> will be moved in some months to another server... 
> so I think that the link to the files positions into the file system
> isn't a valid solution...
> 
> can you suggest me a better way to manage this pdf data?? 
> Each pdf is quite small (<100k)
> 
> should I use BLOB?

I have made quite good experience storing BLOBs (bytea in Postgres) inside the 
database. I do like the transactional safety I get from the database and the 
fact that the database an handle several ten thousands of documents in a single 
table without a problem. With a file based solution you'll need to find a way to 
distribute the PDFs over different directories to ensure that the file count in 
each directory doesn't get too high (at least we had some problems storing about 
50.000 documents (Word, pdf, ...) on a HP/UX machine in a single directory. 
Especially when trying to access that directory via ftp...

Thomas



pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: inconsistent automatic casting between psql and function
Next
From: Andreas Joseph Krogh
Date:
Subject: Re: store pdf files