Re: Add support for DEFAULT specification in COPY FROM

From: Israel Barth Rubio <barthisrael(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add support for DEFAULT specification in COPY FROM
Date: 2022-09-26 15:12:15
Message-ID: CAO_rXXARfeAdjcqLMPo2+y38sS6HqVYqFaJCT5-bLvGRAv7qgg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Andrew,

> . 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.

Thanks for your review! I have applied the suggested changes, and I'm
submitting the new patch version.

Kind regards,
Israel.

Attachment Content-Type Size
v3-0001-Added-support-for-DEFAULT-in-COPY-FROM.patch application/octet-stream 31.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message James Coleman 2022-09-26 15:17:01 Re: Consider parallel for lateral subqueries with limit
Previous Message Jonathan S. Katz 2022-09-26 15:06:51 PostgreSQL 15 GA release date