From: Tom Lane <tgl@sss.pgh.pa.us>
To: keke abe <keke@mac.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: COPY BINARY to stdout
Date: Thu, 12 Oct 2000 11:04:04 -0400
Message-ID: <26208.971363044@sss.pgh.pa.us> (raw)
In-Reply-To: <19340906010007.3839@mail.gol.com>
References: <19340906010007.3839@mail.gol.com>
keke abe <keke@mac.com> writes:
> After receiving the 'H' (COPY_OUT) message from the backend,
> how should I tell if the incoming data is in binary format or
> not?
You don't; you just have to know whether you asked for binary or text
copy. At the moment binary copy to/from the frontend is disabled
anyway:
/*
* This restriction is unfortunate, but necessary until the frontend
* COPY protocol is redesigned to be binary-safe...
*/
if (pipe && binary)
elog(ERROR, "COPY BINARY is not supported to stdout or from stdin");
There's a TODO list item to invent a less brain-dead format for binary
COPY data. (The binary cursor representation is not too bad, maybe just
use that.)
In the meantime I suggest forget about COPY BINARY and use DECLARE
BINARY CURSOR instead.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, keke@mac.com
Subject: Re: COPY BINARY to stdout
In-Reply-To: <26208.971363044@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox