pgsql: Fix inconsistent equalfuncs.c behavior for FuncCall.funcformat.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix inconsistent equalfuncs.c behavior for FuncCall.funcformat.
Date: 2021-06-06 19:47:04
Message-ID: E1lpyjg-0002qI-KR@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix inconsistent equalfuncs.c behavior for FuncCall.funcformat.

Other equalfuncs.c checks on CoercionForm fields use
COMPARE_COERCIONFORM_FIELD (which makes them no-ops),
but commit 40c24bfef neglected to make _equalFuncCall
do likewise. Fix that.

This is only strictly correct if FuncCall.funcformat has
no semantic effect, instead just determining ruleutils.c
display formatting. 40c24bfef added a couple of checks
in parse analysis that could break that rule; but on closer
inspection, they're redundant, so just take them out again.

Per report from Noah Misch.

Discussion: https://postgr.es/m/20210606063331.GC297923@rfd.leadboat.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a65e9f3f1405b786673feec131879843432bf9a6

Modified Files
--------------
src/backend/nodes/equalfuncs.c | 2 +-
src/backend/parser/parse_clause.c | 1 -
src/backend/parser/parse_func.c | 1 -
3 files changed, 1 insertion(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Etsuro Fujita 2021-06-07 03:54:26 pgsql: Fix rescanning of async-aware Append nodes.
Previous Message Tom Lane 2021-06-06 19:13:51 Re: pgsql: Add transformed flag to nodes/*funcs.c for CREATE STATISTICS