Hi, here’s a rebased version of the patch.
Best regards,
Rémi
v7-0001-Add-header-support-to-COPY-TO-text-format.patch
Description: Binary data
v7-0002-Add-header-matching-mode-to-COPY-FROM.patch
Description: Binary data
> On 21 Oct 2020, at 19:49, Daniel Verite wrote:
>
>
-to-COPY-FROM.patch
Description: Binary data
> On 11 Apr 2021, at 16:35, Rémi Lapeyre wrote:
>
>>
>>>> This now reads "Represents whether the header must be absent, present or
>>>> match.”.
>>
>> Since match shouldn't be preceded
>
> Michael, since the issue of duplicated options has been fixed do either of
> these patches look like they are ready for commit?
>
Here’s a rebased version of the patch.
Cheers,
Rémi
> Regards,
> --
> -David
> da...@pgmasters.net
v8-0001-Add-header-support-to-COPY-TO-text-format.pa
>
> Hi,
> >> sure it matches what is expected and exit immediatly if it does not.
>
> Typo: immediately
>
> +CREATE FOREIGN TABLE header_dont_match (a int, foo text) SERVER file_server
>
> nit: since header is singular, you can name the table header_doesnt_match
>
> + from the one expect
>
> >> This now reads "Represents whether the header must be absent, present or
> >> match.”.
>
> Since match shouldn't be preceded with be, I think we can say:
>
> Represents whether the header must match, be absent or be present.
Thanks, here’s a v10 version of the patch that fixes this.
Thanks Daniel for the review and Vignesh for addressing the comments.
I have two remarks with the state of the current patches:
- DefGetCopyHeader() duplicates a lot of code from defGetBoolean(), should we
refactor this so that they can share more of their internals? In the current
implementatio
>
> 2780: Allow COPY "text" to output a header and add header matching mode to
> COPY
> FROM
> ===
> The original patch was rejected for lacking matching, but it has since been
> addressed in an updated patch which has se
The PGDATABASE is documented as behaving the same as the dbname connection
parameter but they differ in the support for postgres:// URIs: the
PGDATABASE will never be expanded even thought expand_dbname is set:
$ psql postgres://localhost/test -c 'select 1' >/dev/null # Works
$ PG
> Le 17 avr. 2023 à 03:25, Tom Lane a écrit :
>
> You can do this:
>
> $ psql -d "postgres://localhost/test"
>
> but that's not the same thing as reinterpreting the dbname field
> of what we have already determined to be a connection string.
>
Yes, I know see the difference, I got confused
> 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 re
Hi, here's a new version of the patch that should apply cleanly. I'll monitor
the status on http://cfbot.cputube.org/
Rémi
---
contrib/file_fdw/input/file_fdw.source | 7 +-
contrib/file_fdw/output/file_fdw.source | 13 ++--
doc/src/sgml/ref/copy.sgml | 9 ++-
src/backend/command
>
> Please reply to the old thread about this, as that's the one connected to the
> Commitfest entry and thats where all the discussion has happened. While
> additional threads can be attached to a CF entry, it's for when multiple
> discussions are relevant to a patch, a single discussion should
CSV format supports the HEADER option to output a header in the output,
it is convenient when other programs need to consume the output. This
patch adds the same option to the default text format.
Discussion:
https://www.postgresql.org/message-id/flat/caf1-j-0ptcwmeltswwgv2m70u26n4g33gpe1rckqqe6
> It's hard to find an explanation what this patch actually does. I don't
> want to have to go through threads dating back 4 months to determine
> what was discussed and what was actually implemented. Since you're
> already using git format-patch, just add something to the commit message.
>
>
COPY FROM supports the HEADER option to silently discard the header from
a CSV or text file. It is possible to load by mistake a file that
matches the expected format, for example if two text columns have been
swapped, resulting in garbage in the database.
This option adds the possibility to actu
>
> I don't know how to do that with git-send-email, but you can certainly do it
> easy with git-format-patch and just attach them using your regular MUA.
>
> (and while the cfbot and the archives have no problems dealing with the
> change in subject, it does break threading in some other MUAs,
Thanks for the feedback,
> There is one warning present in the changes:
> copy.c: In function ‘ProcessCopyOptions’:
> copy.c:1208:5: warning: ISO C90 forbids mixed declarations and code
> [-Wdeclaration-after-statement]
> char*sval = defGetString(defel);
>
Weirdly this is not caught by c
Hi, thanks for working on this. I had planned to work on it and I’m looking
forward to this natively in Postgres.
The patch builds with the following warnings:
plancat.c:2368:18: warning: variable 'name' is used uninitialized whenever
'for' loop exits because its condition is false [-Wsometimes
This patch adds the possibility to use the "header" option when using COPY with
the text format. A todo entry was opened for this and I updated the tests and
the documentation.
This was previously discussed at
https://www.postgresql.org/message-id/flat/CACfv%2BpJ31tesLvncJyP24quo8AE%2BM0GP6p6MEpw
>
> FWIW there was more recent propose patch at
> https://www.postgresql.org/message-id/flat/caf1-j-0ptcwmeltswwgv2m70u26n4g33gpe1rckqqe6wvqd...@mail.gmail.com
> and among feedback given is to adding header matching feature on to this.
Thanks for the feedback. What should happen now? Can I just
Hi, here's a new version of the patch with the header matching feature.
I should apply cleanly on master, let me know if anything's wrong.
---
contrib/file_fdw/input/file_fdw.source | 7 +-
contrib/file_fdw/output/file_fdw.source | 13 ++--
doc/src/sgml/ref/copy.sgml | 9 ++-
src/
I created an entry for this patch in the new CommiFest but it seems that it is
not finding it. Is there anything that I need to do?
Here's a rebased version that should apply cleanly on HEAD.
---
contrib/file_fdw/input/file_fdw.source | 7 +-
contrib/file_fdw/output/file_fdw.source | 13 ++--
doc/src/sgml/ref/copy.sgml | 9 ++-
src/backend/commands/copy.c | 93 ++---
src/test/re
> I would agree that this is a bug because we are failing to detect
> what's actually a redundant option here as the first option still
> causes the flag to be set to false, but that's not something worth a
> back-patch IMO. What we are looking here is something similar
> to what is done with "fo
03:05, Michael Paquier a écrit :
>
> On Sat, Oct 03, 2020 at 11:42:52PM +0200, Rémi Lapeyre wrote:
>> Here’s a new version of the patches that report an error when the options
>> are set multiple time.
>
> Please note that I have applied a fix for the redundant opti
It looks like this is not in the current commitfest and that Cabot does not
find it. I’m not yet accustomed to the PostgreSQL workflow, should I just
create a new entry in the current commitfest?
Regards,
Rémi
> Le 13 oct. 2020 à 14:49, Rémi Lapeyre a écrit :
>
> Thanks Michael f
26 matches
Mail list logo