From: | Isaac Morland <isaac(dot)morland(at)gmail(dot)com> |
---|---|
To: | Darafei Komяpa Praliaskouski <me(at)komzpa(dot)net> |
Cc: | Joel Jacobson <joel(at)compiler(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Chapman Flack <chap(at)anastigmatix(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: COPY table_name (single_column) FROM 'unknown.txt' DELIMITER E'\n' |
Date: | 2021-05-06 11:41:18 |
Message-ID: | CAMsGm5eMa++616Bxqub=W4S5afF2XH_O_qjzThSsuJjpY0zHwg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 6 May 2021 at 02:21, Darafei "Komяpa" Praliaskouski <me(at)komzpa(dot)net>
wrote:
> What I would prefer is some new COPY mode like RAW that will just push
> whatever it gets on the stdin/input into the cell on the server side. This
> way it can be proxied by psql, utilize existing infra for passing streams
> and be used in shell scripting.
>
Yes! A significant missing feature is “take this arbitrary bucket of bits
and move it to/from the database from/to this file without modification of
any kind”. There are all sorts of tutorials on the Web about how to almost
do it or fake it or convert to hex or whatever but I’ve never seen a nice
simple explanation of “here is the command:”.
Of course there is a lot to think about. Coming out of the database, the
query result must be exactly one row containing exactly one column; how do
we handle other database results? Coming into the database, only one data
value can come from a single file; so how do we populate the other columns
of whatever table we copy to?
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Nancarrow | 2021-05-06 11:53:32 | Re: [bug?] Missed parallel safety checks, and wrong parallel safety |
Previous Message | Amit Kapila | 2021-05-06 11:39:40 | Re: RFC: Detailed reorder buffer stats dumps |