Re: unsupportable composite type partition keys

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Langote <amitlangote09@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-12-18T13:38:46Z
Lists: pgsql-hackers
Amit Langote <amitlangote09@gmail.com> writes:
> On Wed, Dec 18, 2019 at 2:12 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Hm.  Seems like the restrictions here ought to be just about the same
>> as on index columns, no?

> We also need to disallow self-referencing composite type in the case
> of partitioning, because otherwise it leads to infinite recursion
> shown in my first email.

My point is basically that CheckAttributeType already covers that
issue, as well as a lot of others.  So why isn't the partitioning
code using it?

			regards, tom lane



Commits

  1. Fix CheckAttributeType's handling of collations for ranges.

  2. Improve comments in utils/rel.h.

  3. Allow whole-row Vars to be used in partitioning expressions.

  4. Remove equalPartitionDescs().

  5. Load relcache entries' partitioning data on-demand, not immediately.

  6. Disallow partition key expressions that return pseudo-types.

  7. Prevent a rowtype from being included in itself via a range.