Re: unsupportable composite type partition keys
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Amit Langote <amitlangote09@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-01-31T21:20:36Z
Lists: pgsql-hackers
Julien Rouhaud <rjuju123@gmail.com> writes: > On Sun, Dec 22, 2019 at 10:51 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: >> While poking at this, I also started to wonder why CheckAttributeType >> wasn't recursing into ranges, since those are our other kind of >> container type. And the answer is that it must, because we allow >> creation of ranges over composite types: > While working on regression tests for index collation versioning [1], > I noticed that the 2nd patch apparently broke the ability to create a > table using a range over collatable datatype attribute, which we > apparently don't test anywhere. Ugh. > AFAICT, this is only a thinko in CheckAttributeType(), where the range > collation should be provided rather than the original tuple desc one, > as per attached. I also added a create/drop table in an existing > regression test that was already creating range over collatable type. Looks good, although I think maybe we'd better test the case a little harder than this. Will tweak that and push -- thanks! regards, tom lane
Commits
-
Fix CheckAttributeType's handling of collations for ranges.
- f521ef0ae319 9.4.26 landed
- de3d2df75169 10.12 landed
- 74b35eb468dc 13.0 landed
- 742c646c1987 9.6.17 landed
- 65aa155135a5 12.2 landed
- 59047b6d0c93 9.5.21 landed
- 25dc267a1be5 11.7 landed
-
Improve comments in utils/rel.h.
- fbe0232358c1 13.0 landed
-
Allow whole-row Vars to be used in partitioning expressions.
- bb4114a4e2c6 13.0 landed
-
Remove equalPartitionDescs().
- 42f74f49367b 13.0 landed
-
Load relcache entries' partitioning data on-demand, not immediately.
- 5b9312378e2f 13.0 landed
-
Disallow partition key expressions that return pseudo-types.
- ea1205a02a03 10.12 landed
- 7fbb39a967ea 12.2 landed
- 281dd22ac015 11.7 landed
- 39ebb943de9d 13.0 landed
-
Prevent a rowtype from being included in itself via a range.
- 6609c3ad984b 9.5.21 landed
- 4af2531d0393 10.12 landed
- 354d913f9745 9.6.17 landed
- 31dfa40a8341 11.7 landed
- 0d245d13c643 9.4.26 landed
- fc7695891d35 13.0 landed
- 976cb11f6c58 12.2 landed