From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Consider only relations part of partition trees in partition fun
Date: Sat, 02 Mar 2019 09:20:14 +0000
Message-ID: <E1h00oY-0003Ym-Nz@gemulon.postgresql.org> (raw)
Consider only relations part of partition trees in partition functions
This changes the partition functions so as tables and indexes which are
not part of partition trees are handled the same way as what is done for
undefined objects and unsupported relkinds: pg_partition_tree() returns
no rows and pg_partition_root() returns a NULL result. Hence,
partitioned tables, partitioned indexes and relations whose flag
pg_class.relispartition is set are considered as valid objects to
process.
Previously, tables and indexes not included in a partition tree were
processed the same way as a partition or a partitioned table, which
caused the functions to return inconsistent results for inherited
tables, especially when inheriting from multiple tables.
Reported-by: Álvaro Herrera
Author: Amit Langote, Michael Paquier
Reviewed-by: Tom Lane
Discussion: https://postgr.es/m/20190228193203.GA26151@alvherre.pgsql
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/3422955735d9b2623532c60c53cb885c9cb6e3b1
Modified Files
--------------
src/backend/utils/adt/partitionfuncs.c | 13 ++------
src/test/regress/expected/partition_info.out | 48 +++++++++++++++++++++-------
src/test/regress/sql/partition_info.sql | 17 ++++++++--
3 files changed, 55 insertions(+), 23 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: michael@paquier.xyz
Subject: Re: pgsql: Consider only relations part of partition trees in partition fun
In-Reply-To: <E1h00oY-0003Ym-Nz@gemulon.postgresql.org>
References: <E1h00oY-0003Ym-Nz@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