Re: query option in COPY postgres
От | Adrian Klaver |
---|---|
Тема | Re: query option in COPY postgres |
Дата | |
Msg-id | 5640D444.30801@aklaver.com обсуждение исходный текст |
Ответ на | Re: query option in COPY postgres (masyaf <kavtaradze.s@gmail.com>) |
Список | pgsql-sql |
On 11/06/2015 02:54 PM, masyaf wrote: > Can you give any details about that? > I am assuming you are referring to COPY FROM a program. Take a look at the docs: http://www.postgresql.org/docs/9.4/interactive/sql-copy.html "When PROGRAM is specified, the server executes the given command and reads from the standard output of the program, or writes to the standard input of the program. The command must be specified from the viewpoint of the server, and be executable by the PostgreSQL user. When STDIN or STDOUT is specified, data is transmitted via the connection between the client and the server." In my case I would write the program in Python and output CSV. Every time I do that though, I just go ahead and use the copy_from() method of the psycopg2 cursor and never get to the above. > > > -- > View this message in context: http://postgresql.nabble.com/query-option-in-COPY-postgres-tp5873015p5873038.html > Sent from the PostgreSQL - sql mailing list archive at Nabble.com. > > -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-sql по дате отправления: