Issue With COPY TO STDOUT / COPY FROM STDIN

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • denniswimer
    New Member
    • Jan 2008
    • 1

    Issue With COPY TO STDOUT / COPY FROM STDIN

    I seem to be having issues with the <psql -U postgres -d database1> -c "COPY <tablename> TO STDOUT;" | <psql -U postgres -d database2> -e -c "COPY <tablename> FROM STDIN;" when both databases reside on the same localhost machine. These commands work beautifully when the databases reside on different remote machines.

    I could find nothing in documentation or forums that would indicate that this is an issue. The only difference in execution is location of the databases -- nothing else.

    Is there something I'm missing regarding local execution?
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    Originally posted by denniswimer
    I seem to be having issues with the <psql -U postgres -d database1> -c "COPY <tablename> TO STDOUT;" | <psql -U postgres -d database2> -e -c "COPY <tablename> FROM STDIN;" when both databases reside on the same localhost machine. These commands work beautifully when the databases reside on different remote machines.

    I could find nothing in documentation or forums that would indicate that this is an issue. The only difference in execution is location of the databases -- nothing else.

    Is there something I'm missing regarding local execution?
    what is the error message?

    Comment

    Working...