Re: COPY BINARY to stdout

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: COPY BINARY to stdout
Дата
Msg-id 26208.971363044@sss.pgh.pa.us
обсуждение исходный текст
Ответ на COPY BINARY to stdout  (keke abe <keke@mac.com>)
Список 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
bebinary-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


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Peter Mount
Дата:
Сообщение: Re: JDBC Large ResultSet problem + BadTimeStamp Patch
Следующее
От: Joseph Shraibman
Дата:
Сообщение: Re: JDBC Large ResultSet problem + BadTimeStamp Patch