pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix failure to enforce partitioning contraint for internal parti
Date: Thu, 19 Jan 2017 17:39:47 +0000
Message-ID: <E1cUGgd-0005Kl-6Y@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Fix failure to enforce partitioning contraint for internal partitions.

When a tuple is inherited into a partitioning root, no partition
constraints need to be enforced; when it is inserted into a leaf, the
parent's partitioning quals needed to be enforced.  The previous
coding got both of those cases right.  When a tuple is inserted into
an intermediate level of the partitioning hierarchy (i.e. a table
which is both a partition itself and in turn partitioned), it must
enforce the partitioning qual inherited from its parent.  That case
got overlooked; repair.

Amit Langote

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/39162b2030fb0a35a6bb28dc636b5a71b8df8d1c

Modified Files
--------------
src/backend/commands/copy.c          |  1 -
src/backend/commands/tablecmds.c     |  1 -
src/backend/executor/execMain.c      | 42 ++++++++++++++++++++++++++++--------
src/include/executor/executor.h      |  1 -
src/test/regress/expected/insert.out |  6 ++++++
src/test/regress/sql/insert.sql      |  5 +++++
6 files changed, 44 insertions(+), 12 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1cUGgd-0005Kl-6Y@gemulon.postgresql.org>
Permalink:  ../E1cUGgd-0005Kl-6Y@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1cUGgd-0005Kl-6Y@gemulon.postgresql.org

 · 

reply

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: rhaas@postgresql.org
  Subject: Re: pgsql: Fix failure to enforce partitioning contraint for internal parti
  In-Reply-To: <E1cUGgd-0005Kl-6Y@gemulon.postgresql.org>
  References: <E1cUGgd-0005Kl-6Y@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