From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Allow whole-row Vars to be used in partitioning expressions.
Date: Wed, 25 Dec 2019 20:44:21 +0000
Message-ID: <E1ikDW1-0001Mb-QU@gemulon.postgresql.org> (raw)
Allow whole-row Vars to be used in partitioning expressions.
In the wake of commit 5b9312378, there's no particular reason
for this restriction (previously, it was problematic because of
the implied rowtype reference). A simple constraint on a whole-row
Var probably isn't that useful, but conceivably somebody would want
to pass one to a function that extracts a partitioning key. Besides
which, we're expending much more code to enforce the restriction than
we save by having it, since the latter quantity is now zero.
So drop the restriction.
Amit Langote
Discussion: https://postgr.es/m/CA+HiwqFUzjfj9HEsJtYWcr1SgQ_=iCAvQ=O2Sx6aQxoDu4OiHw@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/bb4114a4e2c65f27931cc074214c051dba2876c3
Modified Files
--------------
src/backend/catalog/partition.c | 29 ++++++++--------------
src/backend/commands/tablecmds.c | 40 ++++++++----------------------
src/backend/commands/trigger.c | 11 ++------
src/backend/partitioning/partbounds.c | 4 +--
src/backend/utils/cache/partcache.c | 7 +-----
src/include/catalog/partition.h | 3 +--
src/test/regress/expected/create_table.out | 30 ++++++++++++++++++----
src/test/regress/sql/create_table.sql | 17 +++++++++----
8 files changed, 64 insertions(+), 77 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Allow whole-row Vars to be used in partitioning expressions.
In-Reply-To: <E1ikDW1-0001Mb-QU@gemulon.postgresql.org>
References: <E1ikDW1-0001Mb-QU@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox