git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: ff5d561) | patch
Disallow SRFs when considering sorts below Gather Merge
2020年12月21日 17:58:32 +0000 (18:58 +0100)
2020年12月21日 18:36:22 +0000 (19:36 +0100)
commit fac1b470a9f7e846534620b78ea4cf122ed432b2
Disallow SRFs when considering sorts below Gather Merge

While we do allow SRFs in ORDER BY, scan/join processing should not
consider such cases - such sorts should only happen via final Sort atop
a ProjectSet. So make sure we don't try adding such sorts below Gather
Merge, just like we do for expressions that are volatile and/or not
parallel safe.

Backpatch to PostgreSQL 13, where this code was introduced as part of
the Incremental Sort patch.

Author: James Coleman
Reviewed-by: Tomas Vondra
Backpatch-through: 13
Discussion: https://postgr.es/m/CAAaqYe8cK3g5CfLC4w7bs=hC0mSksZC=H5M8LSchj5e5OxpTAg@mail.gmail.com
Discussion: https://postgr.es/m/295524.1606246314%40sss.pgh.pa.us
src/backend/optimizer/path/equivclass.c diff | blob | blame | history
src/backend/optimizer/util/tlist.c diff | blob | blame | history
src/include/optimizer/optimizer.h diff | blob | blame | history
src/test/regress/expected/incremental_sort.out diff | blob | blame | history
src/test/regress/sql/incremental_sort.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /