This is was a topic I had to do some research on. The conclusion was that storing pictures in PostgreSQL doesn't make a lot of sense, though it is supported.
If you feel you have to store the photos in Postgres.. Check out the documentation section of the PostgreSQL web site, check out the function "pg_largeobject". There it will tell you how all that stuff is done.
Gary
gwinn7e
A+, N+, I+