I'm an Oracle DBA with very little PostgreSQL experience. I have a simple requirement:
I have a table with a bytea column in it and a directory on my server with a bunch of .jpeg files. How can I insert these into that table? I've been searching forums for hours and have seen the same question posted dozens of times, but yet to find a single answer. All I see is how to insert .jpeg's into an oid column which isn't what I need.
Thanks a lot for the reply! This would work yes, but what I'm really looking for is a way to insert into the bytea field by just referring to the jpeg file rather than having to get the hex value of all of the jpeg's first. Something similar to the following that you can use for oid's: