Search Postgresql Archives

Re: pipe text to copy statement stdin input

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux