Re: unsupportable composite type partition keys

Amit Langote <amitlangote09@gmail.com>

From: Amit Langote <amitlangote09@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-12-26T01:41:08Z
Lists: pgsql-hackers
On Thu, Dec 26, 2019 at 5:45 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Amit Langote <amitlangote09@gmail.com> writes:
> >> On Sun, Dec 22, 2019 at 6:13 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >>> I wonder whether we couldn't also lift
> >>> the restriction against whole-row Vars in partition expressions.
> >>> Doesn't seem like there is much difference between such a Var and
> >>> a row(...)::table_rowtype expression.
>
> > I gave that a try and ended up with attached that applies on top of
> > your delay-loading-relcache-partition-data-2.patch.
>
> Pushed with minor fixes.

Thank you.

Regards,
Amit



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.