Greetings,
I've googled a bit on this, and didn't find any clear answers. I've
got a table with several columns, one of which I'd like to hold the
contents of text files. What I tried doing was using psql to do
something like:
psql -q -d database0 -h server -c "UPDATE table set info='`cat
/tmp/file.txt`' where id=3;"
and this almost works. The problem is that whenever there are
carriage returns in file.txt, the rest of the file contents never get
inserted (i only get the first line).
It seems like i'd need to somehow escape out the carriage returns, but
I"m not sure how to do this without altering the contents of file.txt.
thanks for any pointers.