By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,872 Members | 2,333 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,872 IT Pros & Developers. It's quick & easy.

How to store binary files in the PostgreSql database table?

P: 1
I want to store some pdf files in the database, What would be the datatype for the same. If anyone knows please give me the details. I am very new to the PostgreSql database.
Jul 5 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 534
Look at the blob (Large Object) datatype.

Depending on which interface you want to use you may need to dig in into examples of using server side functions or lippq, including this sample program

Alternatively you can store your files on the disk and keep only the pathname on the database.
Many people would argue that this is a better approach.
Jul 5 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.