Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: COPY TO STDOUT BINARY


  • From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
  • To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
  • Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
  • Subject: Re: COPY TO STDOUT BINARY
  • Date: Fri, 30 Dec 2005 18:15:27 -0500 (EST)
  • Message-id: <200512302315.jBUNFR911545@candle.pha.pa.us> <text/plain>

Andreas Pflug wrote:
> Tom Lane wrote:
> > Andreas Pflug <pgadmin(at)pse-consulting(dot)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.
> 
> 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(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group