Re: [PATCH] Rebuild CHECK constraints after generated column SET EXPRESSION

From: Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Rebuild CHECK constraints after generated column SET EXPRESSION
Date: 2026-05-14 17:05:51
Message-ID: CAJTYsWUooEDFaNOiOLjz0NqmqBtof65b-sQQHWmh8jV9t-VYEA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Thu, 14 May 2026 at 10:07, jian he <jian(dot)universality(at)gmail(dot)com> wrote:

>
> RememberWholeRowDependentForRebuilding handles CHECK constraint,
> indexprs, indpred, and policy; we should expect it to be big.
> expr_has_wholerow_var won't help it become more readable, IMHO.
>
> All your other points are being addressed.
> Zsolt Parragi mentioned copy-paste mistake has been corrected.
> And other minor cosmetic changes.
>
>
Thanks for the v3. I checked it applied cleanly and test passes.

I've two minor follow-up comments/questions:

1. The "-- indedx with whole-row reference need rebuild" comment is
still in the new SQL/expected blocks for both generated_stored and
generated_virtual:
"-- index with whole-row reference needs rebuild"

2. The new policy error message:

errmsg("ALTER TABLE / SET EXPRESSION is not supported for
generated columns in tables that are part of a policy
definition"),
errdetail("%s contains whole row references.", ...)

I still find this wording a bit awkward. Quoting "ALTER TABLE /
SET EXPRESSION" as a syntactic form in the message is unusual for
tablecmds.c, and the sentence is long. Could we keep it closer to
the surrounding style.

Just flagging it because this is user-facing text.

Regards,
Ayush

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zsolt Parragi 2026-05-14 17:14:29 Re: on_error table, saving error info to a table
Previous Message Fujii Masao 2026-05-14 16:56:52 Re: Fix bug of COPY TO support partition table