Re: pipe text to copy statement stdin input

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: pipe text to copy statement stdin input
Дата
Msg-id 45244DD0-349E-4CCF-A79D-1784745E3741@seespotcode.net
обсуждение исходный текст
Ответ на pipe text to copy statement stdin input  (Scott Frankel <frankel@circlesfx.com>)
Список pgsql-general
On Jun 21, 2011, at 15:43, Scott Frankel wrote:

> Is there a way to pipe text into a COPY statement's stdin input using cmd-line psql?

cat myfile | psql -c "COPY mytable (name, description, text) FROM stdin"

> - The db is password protected, so invoking `psql` as a non-interactive command may not be possible.  Right?

Use a .pgpass file


Michael Glaesemann
grzm seespotcode net




В списке pgsql-general по дате отправления:

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: pipe text to copy statement stdin input
Следующее
От: Greg Smith
Дата:
Сообщение: Re: Tuning for a tiny database