postgresql/src/backend/utils/adt
Tom Lane 2591ee8ec4 Fix assorted missing logic for GroupingFunc nodes.
The planner needs to treat GroupingFunc like Aggref for many purposes,
in particular with respect to processing of the argument expressions,
which are not to be evaluated at runtime.  A few places hadn't gotten
that memo, notably including subselect.c's processing of outer-level
aggregates.  This resulted in assertion failures or wrong plans for
cases in which a GROUPING() construct references an outer aggregation
level.

Also fix missing special cases for GroupingFunc in cost_qual_eval
(resulting in wrong cost estimates for GROUPING(), although it's
not clear that that would affect plan shapes in practice) and in
ruleutils.c (resulting in excess parentheses in pretty-print mode).

Per bug #17088 from Yaoguang Chen.  Back-patch to all supported
branches.

Richard Guo, Tom Lane

Discussion: https://postgr.es/m/17088-e33882b387de7f5c@postgresql.org
2022-03-21 17:44:29 -04:00
..
.gitignore
acl.c
amutils.c
array_expanded.c
array_selfuncs.c
array_typanalyze.c
array_userfuncs.c
arrayfuncs.c
arraysubs.c
arrayutils.c
ascii.c
bool.c
cash.c
char.c
cryptohashfuncs.c
date.c
datetime.c Create routine able to set single-call SRFs for Materialize mode 2022-03-07 10:26:29 +09:00
datum.c
dbsize.c
domains.c
encode.c
enum.c
expandeddatum.c
expandedrecord.c
float.c
format_type.c
formatting.c Support "of", "tzh", and "tzm" format codes. 2022-03-14 16:50:54 -04:00
genfile.c Create routine able to set single-call SRFs for Materialize mode 2022-03-07 10:26:29 +09:00
geo_ops.c
geo_selfuncs.c
geo_spgist.c
inet_cidr_ntop.c
inet_net_pton.c
int8.c
int.c
json.c
jsonb_gin.c
jsonb_op.c
jsonb_util.c
jsonb.c
jsonbsubs.c
jsonfuncs.c Create routine able to set single-call SRFs for Materialize mode 2022-03-07 10:26:29 +09:00
jsonpath_exec.c
jsonpath_gram.y
jsonpath_scan.l
jsonpath.c
levenshtein.c
like_match.c
like_support.c
like.c
lockfuncs.c
mac8.c
mac.c
Makefile
mcxtfuncs.c Create routine able to set single-call SRFs for Materialize mode 2022-03-07 10:26:29 +09:00
misc.c Fix pg_tablespace_location() with in-place tablespaces 2022-03-17 11:25:02 +09:00
multirangetypes_selfuncs.c
multirangetypes.c
name.c
network_gist.c
network_selfuncs.c
network_spgist.c
network.c
numeric.c
numutils.c
oid.c
oracle_compat.c
orderedsetaggs.c
partitionfuncs.c
pg_locale.c Fix global ICU collations for ICU < 54 2022-03-20 10:21:45 +01:00
pg_lsn.c
pg_upgrade_support.c
pgstatfuncs.c Create routine able to set single-call SRFs for Materialize mode 2022-03-07 10:26:29 +09:00
pseudotypes.c
quote.c
rangetypes_gist.c
rangetypes_selfuncs.c
rangetypes_spgist.c
rangetypes_typanalyze.c
rangetypes.c
regexp.c
regproc.c
ri_triggers.c Enforce foreign key correctly during cross-partition updates 2022-03-20 18:43:40 +01:00
rowtypes.c
ruleutils.c Fix assorted missing logic for GroupingFunc nodes. 2022-03-21 17:44:29 -04:00
selfuncs.c
tid.c
timestamp.c
trigfuncs.c
tsginidx.c
tsgistidx.c
tsquery_cleanup.c
tsquery_gist.c
tsquery_op.c
tsquery_rewrite.c
tsquery_util.c
tsquery.c
tsrank.c Fix collection of typos in the code and the documentation 2022-03-15 11:29:35 +09:00
tsvector_op.c
tsvector_parser.c
tsvector.c
uuid.c
varbit.c
varchar.c
varlena.c Create routine able to set single-call SRFs for Materialize mode 2022-03-07 10:26:29 +09:00
version.c
windowfuncs.c
xid8funcs.c Remove workarounds for avoiding [U]INT64_FORMAT in translatable strings. 2022-03-21 11:11:55 -04:00
xid.c
xml.c Fix incorrect xmlschema output for types timetz and timestamptz. 2022-03-18 16:01:42 -04:00