From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Pavel Golub <pavel(at)microolap(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: raw output from copy |
Date: | 2015-07-05 22:55:54 |
Message-ID: | CAFj8pRCGr-63M9Xv1Ruvw-Ltmxf_wp+j9GTRnRyFO9HvetKYwg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2015-07-02 17:02 GMT+02:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> > Does the COPY line protocol even support binary data?
>
> The protocol, per se, just transmits a byte stream. There is a field
> in the CopyInResponse/CopyOutResponse messages that indicates whether
> a text or binary copy is being done. One thing we'd have to consider
> is whether "raw" mode is sufficiently different from binary to justify
> an additional value for this field, and if so whether that constitutes
> a protocol break. sql/plpgsql_check_passive-9.6.sql
>
> IIRC, psql wouldn't really care; it just transfers the byte stream to or
> from the target file, regardless of text or binary mode. But there might
> be other client libraries that are smarter and expect "binary" mode to
> mean the binary file format specified in the COPY reference page. So
> there may be value in being explicit about "raw" mode in these messages.
>
The safe way is create new mode and propagate it on client. It should to
not break any current applications, because no one uses COPY RAW.
>
> A key point in all this is that people who need "raw" transfer probably
> need it in both directions, a point that your SELECT proposal cannot
> satisfy, but hacking COPY could. So I lean towards the latter really.
>
yes, it has sense. I am not sure, if I'll have time to implement it in this
step, but I'll look on it.
regards
Pavel
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-07-05 23:46:13 | Inconsistent style in pgbench's error messages |
Previous Message | Jeff Davis | 2015-07-05 21:56:53 | Re: Parallel Seq Scan |