From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Expand virtual generated columns in constraint expressions |
Date: | 2025-09-15 14:33:21 |
Message-ID: | E1uyAGe-000qR4-36@gemulon.postgresql.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Expand virtual generated columns in constraint expressions
Virtual generated columns in constraint expressions need to be
expanded because the optimizer matches these expressions to qual
clauses. Failing to do so can cause us to miss opportunities for
constraint exclusion.
Author: Richard Guo <guofenglinux(at)gmail(dot)com>
Discussion: https://www.postgresql.org/message-id/flat/204804c0-798f-4c72-bd1f-36116024fda3%40eisentraut.org
Branch
------
REL_18_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/e7a2bbdb522dd6fc7283550742b8b52605198783
Modified Files
--------------
src/backend/optimizer/util/plancat.c | 9 +++++++++
src/test/regress/expected/generated_virtual.out | 23 +++++++++++++++++++++++
src/test/regress/sql/generated_virtual.sql | 15 +++++++++++++++
3 files changed, 47 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2025-09-15 20:57:06 | pgsql: Teach nbtree to avoid evaluating row compare keys. |
Previous Message | Peter Eisentraut | 2025-09-15 10:15:14 | pgsql: CREATE STATISTICS: improve misleading error message |