pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedCOPY BINARY to stdout
2+ messages / 2 participants
[nested] [flat]
* COPY BINARY to stdout
@ 2000-10-12 07:28 keke abe <keke@mac.com>
2000-10-12 15:04 ` Re: COPY BINARY to stdout Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: keke abe @ 2000-10-12 07:28 UTC (permalink / raw)
To: pgsql-interfaces
Hello,
After receiving the 'H' (COPY_OUT) message from the backend,
how should I tell if the incoming data is in binary format or
not?
TIA,
Takehiko Abe
--
"Left channel, right channel, center channel."
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: COPY BINARY to stdout
2000-10-12 07:28 COPY BINARY to stdout keke abe <keke@mac.com>
@ 2000-10-12 15:04 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2000-10-12 15:04 UTC (permalink / raw)
To: keke abe <keke@mac.com>; +Cc: pgsql-interfaces
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2000-10-12 15:04 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-10-12 07:28 COPY BINARY to stdout keke abe <keke@mac.com>
2000-10-12 15:04 ` Tom Lane <tgl@sss.pgh.pa.us>
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