postgresql/src
Tomas Vondra ebb7ae839d Fix get_useful_pathkeys_for_relation for volatile expressions
When considering Incremental Sort below a Gather Merge, we need to be
a bit more careful when matching pathkeys to EC members. It's not enough
to find a member whose Vars are all in the current relation's target;
volatile expressions in particular need to be contained in the target,
otherwise it's too early to use the pathkey.

Reported-by: Jaime Casanova
Author: James Coleman
Reviewed-by: Tomas Vondra
Backpatch-through: 13, where the incremental sort code was added
Discussion: https://postgr.es/m/CAJGNTeNaxpXgBVcRhJX%2B2vSbq%2BF2kJqGBcvompmpvXb7pq%2BoFA%40mail.gmail.com
2020-11-03 22:31:57 +01:00
..
backend Fix get_useful_pathkeys_for_relation for volatile expressions 2020-11-03 22:31:57 +01:00
bin Track collation versions for indexes. 2020-11-03 01:19:50 +13:00
common Second thoughts on TOAST decompression. 2020-11-02 11:25:18 -05:00
fe_utils Don't use custom OID symbols in pg_type.dat, either. 2020-10-29 13:33:38 -04:00
include Fix get_useful_pathkeys_for_relation for volatile expressions 2020-11-03 22:31:57 +01:00
interfaces Fix some grammar and typos in comments and docs 2020-11-02 15:14:41 +09:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Don't use custom OID symbols in pg_type.dat, either. 2020-10-29 13:33:38 -04:00
port Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
template Makefile comment: remove reference to tools/thread/thread_test 2020-10-27 14:00:50 -04:00
test Fix get_useful_pathkeys_for_relation for volatile expressions 2020-11-03 22:31:57 +01:00
timezone Update time zone data files to tzdata release 2020d. 2020-10-22 21:23:47 -04:00
tools Track collation versions for indexes. 2020-11-03 01:19:50 +13:00
tutorial Remove support for postfix (right-unary) operators. 2020-09-17 19:38:05 -04:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Split Makefile symbol CFLAGS_VECTOR into two symbols. 2020-09-06 21:28:16 -04:00
Makefile.shlib Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00