Re: Add support for DEFAULT specification in COPY FROM

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Israel Barth Rubio <barthisrael(at)gmail(dot)com>, Zhihong Yu <zyu(at)yugabyte(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add support for DEFAULT specification in COPY FROM
Date: 2023-01-09 13:52:41
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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.



Andrew Dunstan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Maxim Orlov 2023-01-09 14:03:27 Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)
Previous Message Amit Kapila 2023-01-09 13:32:15 Re: Fix pg_publication_tables to exclude generated columns