expand virtual generated columns in get_relation_constraints()

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: expand virtual generated columns in get_relation_constraints()
Date: 2025-09-03 14:05:09
Message-ID: 204804c0-798f-4c72-bd1f-36116024fda3@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

We (I) missed expanding virtual generated columns in
get_relation_constraints() in plancat.c. That way, some opportunities
for constraint exclusion will be missed if a constraint contains virtual
generated columns, as can be shown in the attached test case (thanks to
Richard Guo). Simple fix attached.

Attachment Content-Type Size
v1-0001-Expand-virtual-columns-in-get_relation_constraint.patch text/plain 3.0 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2025-09-03 14:41:14 Re: Refactoring: Use soft error reporting for *_opt_error functions
Previous Message Peter Eisentraut 2025-09-03 12:48:40 Re: Remove traces of long in dynahash.c