Re: pipe text to copy statement stdin input - Mailing list pgsql-general

From Michael Glaesemann
Subject Re: pipe text to copy statement stdin input
Date
Msg-id 45244DD0-349E-4CCF-A79D-1784745E3741@seespotcode.net
Whole thread Raw
In response to pipe text to copy statement stdin input  (Scott Frankel <frankel@circlesfx.com>)
List 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 by date:

Previous
From: John R Pierce
Date:
Subject: Re: pipe text to copy statement stdin input
Next
From: Greg Smith
Date:
Subject: Re: Tuning for a tiny database