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-09 03:51:44
Message-ID: fd80e63a-9adb-4d42-a197-c3b8beda8d16@Spark
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2023-07-09 03:59:04 Re: Initial Schema Sync for Logical Replication
Previous Message Paul A Jungwirth 2023-07-09 01:21:55 Re: Exclusion constraints on partitioned tables