pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Remove undocumented restriction against duplicate partition key
3+ messages / 1 participants
[nested] [flat]

* pgsql: Remove undocumented restriction against duplicate partition key
@ 2018-07-19 19:42 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2018-07-19 19:42 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/24097167558bafbc1ea32f67ea5840e5650ad4e7

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(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Remove undocumented restriction against duplicate partition key
@ 2018-07-19 19:42 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2018-07-19 19:42 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Remove undocumented restriction against duplicate partition key
@ 2018-07-19 19:42 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2018-07-19 19:42 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2131d4501f9472ed3714970e45485e5e892615e8

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(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-07-19 19:42 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-07-19 19:42 pgsql: Remove undocumented restriction against duplicate partition key Tom Lane <tgl@sss.pgh.pa.us>
2018-07-19 19:42 pgsql: Remove undocumented restriction against duplicate partition key Tom Lane <tgl@sss.pgh.pa.us>
2018-07-19 19:42 pgsql: Remove undocumented restriction against duplicate partition key Tom Lane <tgl@sss.pgh.pa.us>

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