Home > Archive > PostgreSQL Bugs > December 2005 > COPY TO STDOUT BINARY









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author COPY TO STDOUT BINARY
Andreas Pflug

2005-12-13, 7:24 am

Is COPY foo TO STDOUT BINARY supposed to work? The query will run some
time, but won't give a result.

I couldn't see any mentioning in the COPY command docs that would
prohibit use of this combination.

Tested with psql on 8.0.5 and 8.1.1.

Regards,
Andreas

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Tom Lane

2005-12-13, 11:24 am

Andreas Pflug <pgadmin@pse-consulting.de> writes:
> Is COPY foo TO STDOUT BINARY supposed to work?


I don't think psql will do anything particularly sane with binary copy
data, if that's what you meant.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Andreas Pflug

2005-12-13, 11:24 am

Tom Lane wrote:
> Andreas Pflug <pgadmin@pse-consulting.de> writes:
>
>
>
> I don't think psql will do anything particularly sane with binary copy
> data, if that's what you meant.


echo "COPY foo TO STDOUT BINARY;" | psql >bar

writes a 0 bytes file; not surprised if psql doesn't act sanely in
interactive mode.

For testing, I changed slony to use COPY .. BINARY, same result.

Regards,
Andreas

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Bruce Momjian

2005-12-30, 8:24 pm

Andreas Pflug wrote:
> Tom Lane wrote:
>
> echo "COPY foo TO STDOUT BINARY;" | psql >bar
>
> writes a 0 bytes file; not surprised if psql doesn't act sanely in
> interactive mode.
>
> For testing, I changed slony to use COPY .. BINARY, same result.


I tested this in a stand-alone backend and saw binary output that looked
right, so I think it is only psql that is failing.

--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com