in reply to Re: PostgreSQL and binary data
in thread PostgreSQL and binary data

I would have to strongly concur with grep's suggestion to avoid the storage of binary information, in this case, image files, in PostgreSQL. The amount of work involved in storing and extracting this data and the storage capacity it requires, far outweighs the indexing advantages offered by the database.

By far a better solution is to storage all the image files in a known directory or directory structure and simply store a reference to this file in the database within a standard VARCHAR field. If the storing and indexing of the image files is an issue within itself, you may want to consider looking at Cache::Cache, in particular Cache::FileCache, and link the index of this cache to the database (if indeed you still require the database).

 

perl -e 's&&rob@cowsnet.com.au&&&split/[@.]/&&s&.com.&_&&&print'