Re: Add header support to text format and matching feature

Поиск
Список
Период
Сортировка
Искать
От
Rémi Lapeyre
Тема
Re: Add header support to text format and matching feature
Дата
Msg-id
07891B9D-2140-4C06-AF96-C14F1E1B0E8E@lenstra.fr
Ответ на
Список
Дерево обсуждения
Allow COPY's 'text' format to output a header Simon Muller <samullers@gmail.com>
Re: Allow COPY's 'text' format to output a header David Steele <david@pgmasters.net>
Re: Allow COPY's 'text' format to output a header Michael Paquier <michael@paquier.xyz>
Re: Allow COPY's 'text' format to output a header Garick Hamlin <ghamlin@isc.upenn.edu>
Re: Allow COPY's 'text' format to output a header "David G. Johnston" <david.g.johnston@gmail.com>
Re: Allow COPY's 'text' format to output a header Isaac Morland <isaac.morland@gmail.com>
Re: Allow COPY's 'text' format to output a header Michael Paquier <michael@paquier.xyz>
Re: Allow COPY's 'text' format to output a header Simon Muller <samullers@gmail.com>
Re: Allow COPY's 'text' format to output a header Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: Allow COPY's 'text' format to output a header "Daniel Verite" <daniel@manitou-mail.org>
Re: Allow COPY's 'text' format to output a header Isaac Morland <isaac.morland@gmail.com>
Re: Allow COPY's 'text' format to output a header Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow COPY's 'text' format to output a header Robert Haas <robertmhaas@gmail.com>
Re: Allow COPY's 'text' format to output a header "David G. Johnston" <david.g.johnston@gmail.com>
Re: Allow COPY's 'text' format to output a header "Daniel Verite" <daniel@manitou-mail.org>
Re: Allow COPY's 'text' format to output a header Simon Muller <samullers@gmail.com>
Re: Allow COPY's 'text' format to output a header Simon Muller <samullers@gmail.com>
Re: Allow COPY's 'text' format to output a header Cynthia Shang <cynthia.shang@crunchydata.com>
Re: Allow COPY's 'text' format to output a header Simon Muller <samullers@gmail.com>
Re: Allow COPY's 'text' format to output a header "Daniel Verite" <daniel@manitou-mail.org>
Re: Allow COPY's 'text' format to output a header Cynthia Shang <cynthia.shang@crunchydata.com>
Re: Allow COPY's 'text' format to output a header Simon Muller <samullers@gmail.com>
Re: Allow COPY's 'text' format to output a header "Daniel Verite" <daniel@manitou-mail.org>
Re: Allow COPY's 'text' format to output a header Cynthia Shang <cynthia.shang@crunchydata.com>
Re: Allow COPY's 'text' format to output a header Simon Muller <samullers@gmail.com>
Re: Allow COPY's 'text' format to output a header Cynthia Shang <cynthia.shang@crunchydata.com>
Re: Allow COPY's 'text' format to output a header Stephen Frost <sfrost@snowman.net>
Re: Allow COPY's 'text' format to output a header Simon Muller <samullers@gmail.com>
Re: Allow COPY's 'text' format to output a header Cynthia Shang <cynthia.shang@crunchydata.com>
Re: Allow COPY's 'text' format to output a header Michael Paquier <michael@paquier.xyz>
Re: Allow COPY's 'text' format to output a header Michael Paquier <michael@paquier.xyz>
[PATCH v1] Allow COPY "test" to output a header and add header matching mode to COPY FROM "Rémi Lapeyre" <remi.lapeyre@henki.fr>
[PATCH v2] Allow COPY "text" to output a header and add header matching mode to COPY FROM "Rémi Lapeyre" <remi.lapeyre@henki.fr>
Re: [PATCH v1] Allow COPY "text" to output a header and add headermatching mode to COPY FROM Rémi Lapeyre <remi.lapeyre@henki.fr>
Re: [PATCH v1] Allow COPY "text" to output a header and add header matching mode to COPY FROM Daniel Gustafsson <daniel@yesql.se>
[PATCH v2] Allow COPY "text" to output a header and add header matching mode to COPY FROM Rémi Lapeyre <remi.lapeyre@lenstra.fr>
Re: [PATCH v2] Allow COPY "text" to output a header and add header matching mode to COPY FROM Daniel Gustafsson <daniel@yesql.se>
Re: [PATCH v2] Allow COPY "text" to output a header and add header matching mode to COPY FROM Rémi Lapeyre <remi.lapeyre@lenstra.fr>
Re: [PATCH v2] Allow COPY "text" to output a header and add header matching mode to COPY FROM Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Add header support to text format and matching feature Rémi Lapeyre <remi.lapeyre@lenstra.fr>
[PATCH v3 1/2] Add header support to "COPY TO" text format Rémi Lapeyre <remi.lapeyre@lenstra.fr>
[PATCH v3 2/2] Add header matching mode to "COPY FROM" Rémi Lapeyre <remi.lapeyre@lenstra.fr>
Re: Add header support to text format and matching feature Magnus Hagander <magnus@hagander.net>
Re: Add header support to text format and matching feature Rémi Lapeyre <remi.lapeyre@lenstra.fr>
Re: Add header support to text format and matching feature vignesh C <vignesh21@gmail.com>
Re: Add header support to text format and matching feature Rémi Lapeyre <remi.lapeyre@lenstra.fr>
Re: Add header support to text format and matching feature "Daniel Verite" <daniel@manitou-mail.org>
Re: Add header support to text format and matching feature vignesh C <vignesh21@gmail.com>
Re: Add header support to text format and matching feature Rémi Lapeyre <remi.lapeyre@lenstra.fr>
Re: Add header support to text format and matching feature Michael Paquier <michael@paquier.xyz>
Re: Add header support to text format and matching feature Rémi Lapeyre <remi.lapeyre@lenstra.fr>
Re: Add header support to text format and matching feature Michael Paquier <michael@paquier.xyz>
Re: Add header support to text format and matching feature Rémi Lapeyre <remi.lapeyre@lenstra.fr>
Re: Add header support to text format and matching feature Rémi Lapeyre <remi.lapeyre@lenstra.fr>
Re: Add header support to text format and matching feature "Daniel Verite" <daniel@manitou-mail.org>
Re: Add header support to text format and matching feature Rémi Lapeyre <remi.lapeyre@lenstra.fr>
Re: [PATCH v1] Allow COPY "text" to output a header and add headermatching mode to COPY FROM Surafel Temesgen <surafel3000@gmail.com>
Re: Allow COPY's 'text' format to output a header Cynthia Shang <cynthia.shang@crunchydata.com>
Re: Allow COPY's 'text' format to output a header Cynthia Shang <cynthia.shang@crunchydata.com>

> On 28 Jan 2022, at 09:57, Peter Eisentraut  wrote:
> 
> On 31.12.21 18:36, Rémi Lapeyre wrote:
>> Here’s an updated version of the patch that takes into account the changes in d1029bb5a2. The actual code is the same as v10 which was already marked as ready for committer.
> 
> I have committed the 0001 patch.  I will work on the 0002 patch next.
> 

Thanks!

> I notice in the 0002 patch that there is no test case for the error "wrong header for column \"%s\": got \"%s\"", which I think is really the core functionality of this patch.  So please add that.
> 

I added a test for it in this new version of the patch.

> I wonder whether the header matching should be a separate option from the HEADER option.  The option parsing in this patch is quite complicated and could be simpler if there were two separate options.  It appears this has been mentioned in the thread but not fully discussed.

I suppose a new option could be added but I’m not sure it would simplify things much with regard to the code and in my opinion it would be a bit weirder for users, right now it is just:

    copy my_table from stdin with (header match);

with an additional option it could be:

    copy my_table from stdin with (header true,  match);

with potentially “header true” being implicit when “match” is given:

    copy my_table from stdin with (match);

But I think we would still have to check for and return an error if the user inputs:

    copy my_table from stdin with (header off, match);


Rather than complicating things, the current implementation seemed to be the best but I will update the patch if you think I should change it.

Best regards,
Rémi

В списке pgsql-hackers по дате отправления
От: Andres Freund
Дата:
От: Noah Misch
Дата:
Сообщение: Re: plperl on windows
FAQ