pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove undocumented restriction against duplicate partition key
Date: Thu, 19 Jul 2018 19:42:01 +0000
Message-ID: <E1fgEoL-0006Yo-9P@gemulon.postgresql.org> (raw)

Remove undocumented restriction against duplicate partition key columns.

transformPartitionSpec rejected duplicate simple partition columns
(e.g., "PARTITION BY RANGE (x,x)") but paid no attention to expression
columns, resulting in inconsistent behavior.  Worse, cases like
"PARTITION BY RANGE (x,(x))") were accepted but would then result in
dump/reload failures, since the expression (x) would get simplified
to a plain column later.

There seems no better reason for this restriction than there was for
the one against duplicate included index columns (cf commit 701fd0bbc),
so let's just remove it.

Back-patch to v10 where this code was added.

Report and patch by Yugo Nagata.

Discussion: https://postgr.es/m/20180712165939.36b12aff.nagata@sraoss.co.jp

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b1af4bcc42f7e95abb9e8bceb894e0ef2acfc55a

Modified Files
--------------
src/backend/commands/tablecmds.c           | 15 ---------------
src/test/regress/expected/create_table.out |  5 -----
src/test/regress/sql/create_table.sql      |  5 -----
3 files changed, 25 deletions(-)



view thread (3+ messages)  latest in thread

Message-ID: <E1fgEoL-0006Yo-9P@gemulon.postgresql.org>
Permalink:  ../E1fgEoL-0006Yo-9P@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1fgEoL-0006Yo-9P@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: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Remove undocumented restriction against duplicate partition key
  In-Reply-To: <E1fgEoL-0006Yo-9P@gemulon.postgresql.org>
  References: <E1fgEoL-0006Yo-9P@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