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

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: fc76958) | patch
Disallow partition key expressions that return pseudo-types.
2019年12月23日 17:53:12 +0000 (12:53 -0500)
2019年12月23日 17:53:12 +0000 (12:53 -0500)
commit 39ebb943de9dd64e305d17329b8989e3061d03a5
Disallow partition key expressions that return pseudo-types.

This wasn't checked originally, but it should have been, because
in general pseudo-types can't be stored to and retrieved from disk.
Notably, partition bound values of type "record" would not be
interpretable by another session.

In v12 and HEAD, add another flag to CheckAttributeType's repertoire
so that it can produce a specific error message for this case. That's
infeasible in older branches without an ABI break, so fall back to
a slightly-less-nicely-worded error message in v10 and v11.

Problem noted by Amit Langote, though this patch is not his initial
solution. Back-patch to v10 where partitioning was introduced.

Discussion: https://postgr.es/m/CA+HiwqFUzjfj9HEsJtYWcr1SgQ_=iCAvQ=O2Sx6aQxoDu4OiHw@mail.gmail.com
src/backend/catalog/heap.c diff | blob | blame | history
src/backend/commands/tablecmds.c diff | blob | blame | history
src/include/catalog/heap.h 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 によって変換されたページ (->オリジナル) /