inserting/updating a field with the contents of a text file

Поиск
Список
Период
Сортировка
Искать
От
Lonni J Friedman
Тема
inserting/updating a field with the contents of a text file
Дата
Msg-id
7c1574a90709241657lf06fe7bx29be6542d04d2762@mail.gmail.com
Список
Дерево обсуждения
inserting/updating a field with the contents of a text file "Lonni J Friedman" <netllama@gmail.com>
Re: inserting/updating a field with the contents of a text file "George Pavlov" <gpavlov@mynewplace.com>
Re: inserting/updating a field with the contents of a text file "Lonni J Friedman" <netllama@gmail.com>
Re: inserting/updating a field with the contents of a text file Richard Broersma Jr <rabroersma@yahoo.com>
Re: inserting/updating a field with the contents of a text file "Lonni J Friedman" <netllama@gmail.com>
Re: inserting/updating a field with the contents of a text file "Phillip Smith" <phillip.smith@weatherbeeta.com.au>
Re: inserting/updating a field with the contents of a text file Richard Broersma Jr <rabroersma@yahoo.com>
Re: inserting/updating a field with the contents of a text file Richard Broersma Jr <rabroersma@yahoo.com>
Re: inserting/updating a field with the contents of a text file Richard Broersma Jr <rabroersma@yahoo.com>
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.
В списке pgsql-novice по дате отправления
От: Oliver Elphick
Дата:
Сообщение: Re: Odbc connection
От: George Pavlov
Дата:
FAQ