Re: [feature]COPY FROM enable FORCE_NULL/FORCE_NOT_NULL on all columns

From: Zhang Mingli <zmlpostgres(at)gmail(dot)com>
To: andrew(at)dunslane(dot)net <andrew(at)dunslane(dot)net>, Damir Belyalov <dam(dot)bel07(at)gmail(dot)com>
Cc: Melih Mutlu <m(dot)melihmutlu(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [feature]COPY FROM enable FORCE_NULL/FORCE_NOT_NULL on all columns
Date: 2023-07-18 21:08:18
Message-ID: 953a19cb-3cda-4a63-8efb-eaea5501e390@Spark
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Jul 9, 2023 at 11:51 +0800, Zhang Mingli <zmlpostgres(at)gmail(dot)com>, wrote:
HI,

Regards,
Zhang Mingli
On Jul 7, 2023, 18:00 +0800, Damir Belyalov <dam(dot)bel07(at)gmail(dot)com>, wrote:

The patch does not work for the current version of postgres, it needs to be updated.
I tested your patch. Everything looks simple and works well.

There is a suggestion to simplify the code: instead of using

if (cstate->opts.force_notnull_all)
{
int i;
for(i = 0; i < num_phys_attrs; i++)
cstate->opt.force_notnull_flags[i] = true;
}

Thanks very much for review.

Nice suggestion, patch rebased and updated.

V2 patch still have some errors when apply file doc/src/sgml/ref/copy.sgml, rebased and fixed it in V3 path.
Thanks a lot for review.

Zhang Mingli

www.hashdata.xyz
>

Attachment Content-Type Size
v3-0001-COPY-FROM-enable-FORCE_NULL-FORCE_NOT_NULL-on-all-co.patch application/octet-stream 10.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2023-07-18 22:36:59 Re: Use of additional index columns in rows filtering
Previous Message Jeff Davis 2023-07-18 20:21:31 Re: Use of additional index columns in rows filtering