From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Remove unnecessary code in dependency_is_compatible_expression() |
Date: | 2023-03-14 15:10:52 |
Message-ID: | E1pc6Id-003WE3-Ns@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Remove unnecessary code in dependency_is_compatible_expression().
Scanning the expression for compatible Vars isn't really necessary,
because the subsequent match against StatisticExtInfo entries will
eliminate expressions containing other Vars just fine. Moreover,
this code hadn't stopped to think about what to do with
PlaceHolderVars or Aggrefs in the clause; and at least for the PHV
case, that demonstrably leads to failures. Rather than work out
whether it's reasonable to ignore those, let's just remove the
whole stanza.
Per report from Richard Guo. Back-patch to v14 where this code
was added.
Discussion: https://postgr.es/m/CAMbWs48Mmvm-acGevXuwpB=g5JMqVSL6i9z5UaJyLGJqa-XPAA@mail.gmail.com
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/3b459444301c4c40e8d978ef6025c7177c85c017
Modified Files
--------------
src/backend/statistics/dependencies.c | 28 +++-------------------------
1 file changed, 3 insertions(+), 25 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2023-03-14 20:09:15 | pgsql: Allow pg_dump to include/exclude child tables automatically. |
Previous Message | Tomas Vondra | 2023-03-14 14:24:41 | Re: lz4 --rm on Ubuntu 18.04 (Add LZ4 compression to pg_dump) |