Re: Add support for DEFAULT specification in COPY FROM - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Add support for DEFAULT specification in COPY FROM
Date
Msg-id b5ca24d7-b1eb-bf03-7ba9-78d82f85aa79@dunslane.net
Whole thread Raw
In response to Re: Add support for DEFAULT specification in COPY FROM  (Israel Barth Rubio <barthisrael@gmail.com>)
Responses Re: Add support for DEFAULT specification in COPY FROM
List pgsql-hackers
On 2022-08-17 We 17:12, Israel Barth Rubio wrote:
> Hello Andrew,
>
> Thanks for reviewing this patch
[...]
>
> I am attaching the new patch, containing the above test in the regress
> suite.
>


Thanks, this looks good but there are some things that need attention:

. There needs to be a check that this is being used with COPY FROM, and
the restriction needs to be stated in the docs and tested for. c.f.
FORCE NULL.

. There needs to be support for this in psql's tab_complete.c, and
appropriate tests added

. There needs to be support for it in contrib/file_fdw/file_fdw.c, and a
test added

. The tests should include psql's \copy as well as sql COPY

. I'm not sure we need a separate regression test file for this.
Probably these tests can go at the end of src/test/regress/sql/copy2.sql.


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com




pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: archive modules
Next
From: Tom Lane
Date:
Subject: Re: Use "WAL segment" instead of "log segment" consistently in user-facing messages