From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Daniel Verite <daniel(at)manitou-mail(dot)org>, hlinnaka <hlinnaka(at)iki(dot)fi>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Pavel Golub <pavel(at)microolap(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net> |
Subject: | Re: raw output from copy |
Date: | 2016-04-05 08:45:48 |
Message-ID: | CAFj8pRBr3Z32wDb-p1ndS3sNKuMsffc=ftxUzZqxW-n6EbE6eg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi
here is cleaned/finished previous implementation of RAW_TEXT/RAW_BINARY
formats for COPY statements.
The RAW with text formats means unescaped data, but with correct encoding -
input/output is realised with input/output function. RAW binary means
content produced/received by sending/received functions.
Now both directions (input/output) working well
Some examples of expected usage:
copy (select xmlelement(name foo, 'hello')) to stdout (format raw_binary,
encoding 'latin2');
create table avatars(id serial, picture bytea);
\copy avatars(picture) from ~/images/foo.jpg (format raw_binary);
select lastval();
create table doc(id serial, txt text);
\copy doc(txt) from ~/files/aaa.txt (format raw_text, encoding 'latin2');
select lastval();
Regards
Pavel
Attachment | Content-Type | Size |
---|---|---|
copy-raw_text_binary-01.patch | text/x-patch | 42.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2016-04-05 08:48:47 | Re: Support for N synchronous standby servers - take 2 |
Previous Message | Etsuro Fujita | 2016-04-05 08:34:06 | Typo in src/interfaces/libpq/fe-connect.c |