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
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
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.