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

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 35d1eef) | patch
Fix crash when using COLLATE in partition bound expressions
Wed, 8 Apr 2020 06:04:57 +0000 (15:04 +0900)
Wed, 8 Apr 2020 06:04:57 +0000 (15:04 +0900)
commit 0a9ae1800f67339a8acb45029369e60b98e72fd6
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
src/backend/parser/parse_utilcmd.c diff | blob | blame | history
src/test/regress/expected/create_table.out diff | blob | blame | history
src/test/regress/sql/create_table.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

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