Re: pgsql: Don't trust NOT NULL on virtual generated columns of partitioned

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Manu <manuelreyesbravo(at)gmail(dot)com>
Cc: Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Richard Guo <guofenglinux(at)gmail(dot)com>, Richard Guo <rguo(at)postgresql(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Don't trust NOT NULL on virtual generated columns of partitioned
Date: 2026-10-27 03:10:23
Message-ID: CAGRkXqRBPdwHEsVhtj2_w=eVT8tucYbfO19Uon3C61DtamJzBQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Hi Manu,

Thanks for testing the pg_upgrade, I forgot about that.

I don't think the logic is wrong here, but maybe we can make some
improvement to the error message. v2 changes

on the partitioned table of each column listed in the file
=>
on the partitioned table of each column. In version 18 this is not
allowed on a table with CHECK constraints, so drop them first and
add them back afterwards. A list of the problem columns is in the
file
Thanks,
Shihao

Attachment Content-Type Size
nocfbot-v2-REL_18-0001-Require-partitions-to-use-the-parent-s-virtual-gen.patch application/octet-stream 23.1 KB
v2-0001-Require-partitions-to-use-the-parent-s-virtual-ge.patch application/octet-stream 28.9 KB

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2026-10-27 03:19:24 pgsql: doc PG 19 relnotes: mention when ALTER SUBSCRIPTION affects item
Previous Message Bruce Momjian 2026-10-27 02:25:22 pgsql: doc PG 19 relnotes: add mention of view pg_stat_progress_repack

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2026-10-27 03:27:34 Re: Proposal: Conflict log history table for Logical Replication
Previous Message Jeevan Chalke 2026-10-27 02:31:33 Re: PL/pgSQL: fix validation of anycompatiblemultirange