Re: [GENERAL] COPY to STDOUT and pipes

2008-04-14 Thread Klint Gore
kevin kempter wrote: Hi List; I want to run a copy (based on a select) to STDOUT and pipe it to a psql copy from STDIN on a different host. here's what I have: 1) a .sql file that looks like this: copy ( select cust_id, cust_name, last_update_dt from sl_cust ) to STDOUT with delimite

Re: [GENERAL] COPY to STDOUT and pipes

2008-04-14 Thread Craig Ringer
kevin kempter wrote: > Any thoughts on what I'm doing wrong? I suspect that pg_dump is going to do a better job than using psql to generate the input for the remote load. pg_dump can dump single tables and can use COPY style data formatting. As for why your current command isn't working ... You

[GENERAL] COPY to STDOUT and pipes

2008-04-14 Thread kevin kempter
Hi List; I want to run a copy (based on a select) to STDOUT and pipe it to a psql copy from STDIN on a different host. here's what I have: 1) a .sql file that looks like this: copy ( select cust_id, cust_name, last_update_dt from sl_cust ) to STDOUT with delimiter '|' This works.