postgresql/src/backend
Michael Paquier c0187869a0 Fix crash when using COLLATE in partition bound expressions
Attempting to use a COLLATE clause with a type that it not collatable in
a partition bound expression could crash the server.  This commit fixes
the code by adding more checks similar to what is done when computing
index or partition attributes by making sure that there is a collation
iff the type is collatable.

Backpatch down to 12, as 7c079d7 introduced this problem.

Reported-by: Alexander Lakhin
Author: Dmitry Dolgov
Discussion: https://postgr.es/m/16325-809194cf742313ab@postgresql.org
Backpatch-through: 12
2020-04-08 15:04:51 +09:00
..
access Modify various power 2 calculations to use new helper functions 2020-04-08 16:55:03 +12:00
bootstrap Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
catalog Allow users to limit storage reserved by replication slots 2020-04-07 18:35:00 -04:00
commands Implement waiting for given lsn at transaction start 2020-04-07 23:51:10 +03:00
executor Create memory context for HashAgg with a reasonable maxBlockSize. 2020-04-07 21:25:28 -07:00
foreign Update copyrights for 2020 2020-01-01 12:21:45 -05:00
jit Extend ExecBuildAggTrans() to support a NULL pointer check. 2020-03-04 17:29:18 -08:00
lib Move src/backend/utils/hash/hashfn.c to src/common 2020-02-27 09:25:41 +05:30
libpq Provide a TLS init hook 2020-03-25 17:13:17 -04:00
main Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nodes Allow partitionwise joins in more cases. 2020-04-08 10:25:00 +09:00
optimizer Allow partitionwise join to handle nested FULL JOIN USING cases. 2020-04-07 22:12:14 -04:00
parser Fix crash when using COLLATE in partition bound expressions 2020-04-08 15:04:51 +09:00
partitioning Allow partitionwise joins in more cases. 2020-04-08 10:25:00 +09:00
po Translation updates 2019-06-17 15:30:20 +02:00
port Update copyrights for 2020 2020-01-01 12:21:45 -05:00
postmaster Remove debugging elog from pgstat_recv_resetslrucounter 2020-04-07 19:20:20 +02:00
regex Update copyrights for 2020 2020-01-01 12:21:45 -05:00
replication Allow users to limit storage reserved by replication slots 2020-04-07 18:35:00 -04:00
rewrite Fix INSERT OVERRIDING USER VALUE behavior 2020-03-31 08:50:39 +02:00
snowball Update copyrights for 2020 2020-01-01 12:21:45 -05:00
statistics Fix race condition in statext_store(). 2020-03-31 17:06:22 -04:00
storage Support PrefetchBuffer() in recovery. 2020-04-08 14:56:57 +12:00
tcop Implement waiting for given lsn at transaction start 2020-04-07 23:51:10 +03:00
tsearch Remove useless pfree()s at the ends of various ValuePerCall SRFs. 2020-03-16 21:36:53 -04:00
utils Modify various power 2 calculations to use new helper functions 2020-04-08 16:55:03 +12:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Update copyrights for 2020 2020-01-01 12:21:45 -05:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
nls.mk Translation updates 2019-05-20 16:00:53 +02:00