Skip to content

Commit a65e9f3

Browse files
committed
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 40c24bf 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. 40c24bf 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
1 parent d57eceb commit a65e9f3

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

src/backend/nodes/equalfuncs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2420,7 +2420,7 @@ _equalFuncCall(const FuncCall *a, const FuncCall *b)
24202420
COMPARE_SCALAR_FIELD(agg_star);
24212421
COMPARE_SCALAR_FIELD(agg_distinct);
24222422
COMPARE_SCALAR_FIELD(func_variadic);
2423-
COMPARE_SCALAR_FIELD(funcformat);
2423+
COMPARE_COERCIONFORM_FIELD(funcformat);
24242424
COMPARE_LOCATION_FIELD(location);
24252425

24262426
return true;

src/backend/parser/parse_clause.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,6 @@ transformRangeFunction(ParseState *pstate, RangeFunction *r)
543543
!fc->agg_star &&
544544
!fc->agg_distinct &&
545545
!fc->func_variadic &&
546-
fc->funcformat == COERCE_EXPLICIT_CALL &&
547546
coldeflist == NIL)
548547
{
549548
ListCell *lc;

src/backend/parser/parse_func.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs,
222222
agg_order == NIL && agg_filter == NULL &&
223223
!agg_star && !agg_distinct && over == NULL &&
224224
!func_variadic && argnames == NIL &&
225-
funcformat == COERCE_EXPLICIT_CALL &&
226225
list_length(funcname) == 1 &&
227226
(actual_arg_types[0] == RECORDOID ||
228227
ISCOMPLEX(actual_arg_types[0])));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy