Re: COPY command, support for mixing binary and text columns? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: COPY command, support for mixing binary and text columns?
Date
Msg-id 10473.1215967673@sss.pgh.pa.us
Whole thread Raw
In response to COPY command, support for mixing binary and text columns?  ("Stephen R. van den Berg" <srb@cuci.nl>)
List pgsql-hackers
"Stephen R. van den Berg" <srb@cuci.nl> writes:
> Am I correct in the assumption that even though the network protocol
> specifically allows individual columns of a copy command to be
> binary or text format, the current COPY command in 8.3 doesn't
> support specifying that?

Yeah, the protocol is a bit more general than the actual file format.
The text COPY format really couldn't support mixed text and binary
fields at all, of course; and as for the binary format, the COPY
reference page says:

: Presently, all data values in a COPY BINARY file are assumed to be in
: binary format (format code one). It is anticipated that a future
: extension might add a header field that allows per-column format codes
: to be specified.

But it's been like that since PG 7.4, and no one's gotten motivated
to complete the feature, so don't hold your breath ;-)

AFAIK there are no client libraries that actually pay any attention to
the protocol's format codes anyway --- they just push the COPY data
through uninterpreted.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Stephen R. van den Berg"
Date:
Subject: COPY command, support for mixing binary and text columns?
Next
From: Tom Lane
Date:
Subject: Re: PATCH: CITEXT 2.0 v3