Thread: insert pdf
Hello, I have a requirement to store pdf files in a db table. I have a table "state" with columns id_state, name, pdffile (bytea) I want to store the pdf files in the pdffile column. how can i do this. Thanks in advance. Giulio -- View this message in context: http://postgresql.1045698.n5.nabble.com/insert-pdf-tp5748229.html Sent from the PostgreSQL - novice mailing list archive at Nabble.com.
On Tue, Mar 12, 2013 at 10:59 AM, giuliocas <giulio.castagnini@gmail.com> wrote: > Hello, > > I have a requirement to store pdf files in a db table. > > I have a table "state" with columns > id_state, > name, > pdffile (bytea) > > I want to store the pdf files in the pdffile column. > how can i do this. https://wiki.postgresql.org/wiki/BinaryFilesInDB -- Douglas J Hunley (doug.hunley@gmail.com) Twitter: @hunleyd Web: douglasjhunley.com G+: http://goo.gl/sajR3
thank you very much, but what is the SQL command to store binary data using bytea? can i use simply INSERT INTO (like: INSERT INTO table (pdffile) VALUES ('path_to_pdffile_on_server'))? because that's not going to work -- View this message in context: http://postgresql.1045698.n5.nabble.com/insert-pdf-tp5748229p5748445.html Sent from the PostgreSQL - novice mailing list archive at Nabble.com.
Hello See pg_read_binary_file(). bye, -christian- giuliocas hat am 14. März 2013 um 10:39 geschrieben: > thank you very much, but what is the SQL command to store binary data using > bytea? > can i use simply INSERT INTO (like: INSERT INTO table (pdffile) VALUES > ('path_to_pdffile_on_server'))? > because that's not going to work > > > > -- > View this message in context: > http://postgresql.1045698.n5.nabble.com/insert-pdf-tp5748229p5748445.html > Sent from the PostgreSQL - novice mailing list archive at Nabble.com. > > > -- > Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-novice