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 dab13b7f-445c-1345-e047-28e7d0be06c5@dunslane.net
Whole thread Raw
In response to Re: Add support for DEFAULT specification in COPY FROM  (Israel Barth Rubio <barthisrael@gmail.com>)
List pgsql-hackers
On 2022-12-02 Fr 09:11, Israel Barth Rubio wrote:
> Hello all,
>
> I'm submitting a new version of the patch. Instead of changing signature
> of several functions in order to use the defaults parameter, it is now
> storing
> that in the cstate structure, which is already passed to all functions
> that
> were previously modified.
>

I'm reviewing this and it looks in pretty good shape. I notice that in
file_fdw.c:fileIterateForeignScan() we unconditionally generate the
estate, switch context etc, whether or not there is a default option
used. I guess there's no harm in that, and the performance impact should
be minimal, but I thought it worth mentioning, as it's probably not
strictly necessary.


cheers


andrew


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




pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Fix pg_publication_tables to exclude generated columns
Next
From: Maxim Orlov
Date:
Subject: Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)