pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix multiple assignments to a column of a domain type.
6+ messages / 1 participants
[nested] [flat]

* pgsql: Fix multiple assignments to a column of a domain type.
@ 2017-07-11 20:49 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2017-07-11 20:49 UTC (permalink / raw)
  To: pgsql-committers

Fix multiple assignments to a column of a domain type.

We allow INSERT and UPDATE commands to assign to the same column more than
once, as long as the assignments are to subfields or elements rather than
the whole column.  However, this failed when the target column was a domain
over array rather than plain array.  Fix by teaching process_matched_tle()
to look through CoerceToDomain nodes, and add relevant test cases.

Also add a group of test cases exercising domains over array of composite.
It's doubtless accidental that CREATE DOMAIN allows this case while not
allowing straight domain over composite; but it does, so we'd better make
sure we don't break it.  (I could not find any documentation mentioning
either side of that, so no doc changes.)

It's been like this for a long time, so back-patch to all supported
branches.

Discussion: https://postgr.es/m/4206.1499798337@sss.pgh.pa.us

Branch
------
master

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

Modified Files
--------------
src/backend/rewrite/rewriteHandler.c |  31 ++++++++++
src/test/regress/expected/domain.out | 110 +++++++++++++++++++++++++++++++++--
src/test/regress/sql/domain.sql      |  48 +++++++++++++++
3 files changed, 185 insertions(+), 4 deletions(-)


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


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

* pgsql: Fix multiple assignments to a column of a domain type.
@ 2017-07-11 20:49 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2017-07-11 20:49 UTC (permalink / raw)
  To: pgsql-committers

Fix multiple assignments to a column of a domain type.

We allow INSERT and UPDATE commands to assign to the same column more than
once, as long as the assignments are to subfields or elements rather than
the whole column.  However, this failed when the target column was a domain
over array rather than plain array.  Fix by teaching process_matched_tle()
to look through CoerceToDomain nodes, and add relevant test cases.

Also add a group of test cases exercising domains over array of composite.
It's doubtless accidental that CREATE DOMAIN allows this case while not
allowing straight domain over composite; but it does, so we'd better make
sure we don't break it.  (I could not find any documentation mentioning
either side of that, so no doc changes.)

It's been like this for a long time, so back-patch to all supported
branches.

Discussion: https://postgr.es/m/4206.1499798337@sss.pgh.pa.us

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/123368061188ebc8dc99346be2167e3f7a7b618c

Modified Files
--------------
src/backend/rewrite/rewriteHandler.c |  31 ++++++++++
src/test/regress/expected/domain.out | 110 +++++++++++++++++++++++++++++++++--
src/test/regress/sql/domain.sql      |  48 +++++++++++++++
3 files changed, 185 insertions(+), 4 deletions(-)


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


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

* pgsql: Fix multiple assignments to a column of a domain type.
@ 2017-07-11 20:49 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2017-07-11 20:49 UTC (permalink / raw)
  To: pgsql-committers

Fix multiple assignments to a column of a domain type.

We allow INSERT and UPDATE commands to assign to the same column more than
once, as long as the assignments are to subfields or elements rather than
the whole column.  However, this failed when the target column was a domain
over array rather than plain array.  Fix by teaching process_matched_tle()
to look through CoerceToDomain nodes, and add relevant test cases.

Also add a group of test cases exercising domains over array of composite.
It's doubtless accidental that CREATE DOMAIN allows this case while not
allowing straight domain over composite; but it does, so we'd better make
sure we don't break it.  (I could not find any documentation mentioning
either side of that, so no doc changes.)

It's been like this for a long time, so back-patch to all supported
branches.

Discussion: https://postgr.es/m/4206.1499798337@sss.pgh.pa.us

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/56076b88dae090ec63c19c516d300759c3397c05

Modified Files
--------------
src/backend/rewrite/rewriteHandler.c |  31 ++++++++++
src/test/regress/expected/domain.out | 110 +++++++++++++++++++++++++++++++++--
src/test/regress/sql/domain.sql      |  48 +++++++++++++++
3 files changed, 185 insertions(+), 4 deletions(-)


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


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

* pgsql: Fix multiple assignments to a column of a domain type.
@ 2017-07-11 20:49 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2017-07-11 20:49 UTC (permalink / raw)
  To: pgsql-committers

Fix multiple assignments to a column of a domain type.

We allow INSERT and UPDATE commands to assign to the same column more than
once, as long as the assignments are to subfields or elements rather than
the whole column.  However, this failed when the target column was a domain
over array rather than plain array.  Fix by teaching process_matched_tle()
to look through CoerceToDomain nodes, and add relevant test cases.

Also add a group of test cases exercising domains over array of composite.
It's doubtless accidental that CREATE DOMAIN allows this case while not
allowing straight domain over composite; but it does, so we'd better make
sure we don't break it.  (I could not find any documentation mentioning
either side of that, so no doc changes.)

It's been like this for a long time, so back-patch to all supported
branches.

Discussion: https://postgr.es/m/4206.1499798337@sss.pgh.pa.us

Branch
------
REL9_4_STABLE

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

Modified Files
--------------
src/backend/rewrite/rewriteHandler.c |  31 ++++++++++
src/test/regress/expected/domain.out | 110 +++++++++++++++++++++++++++++++++--
src/test/regress/sql/domain.sql      |  48 +++++++++++++++
3 files changed, 185 insertions(+), 4 deletions(-)


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


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

* pgsql: Fix multiple assignments to a column of a domain type.
@ 2017-07-11 20:49 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2017-07-11 20:49 UTC (permalink / raw)
  To: pgsql-committers

Fix multiple assignments to a column of a domain type.

We allow INSERT and UPDATE commands to assign to the same column more than
once, as long as the assignments are to subfields or elements rather than
the whole column.  However, this failed when the target column was a domain
over array rather than plain array.  Fix by teaching process_matched_tle()
to look through CoerceToDomain nodes, and add relevant test cases.

Also add a group of test cases exercising domains over array of composite.
It's doubtless accidental that CREATE DOMAIN allows this case while not
allowing straight domain over composite; but it does, so we'd better make
sure we don't break it.  (I could not find any documentation mentioning
either side of that, so no doc changes.)

It's been like this for a long time, so back-patch to all supported
branches.

Discussion: https://postgr.es/m/4206.1499798337@sss.pgh.pa.us

Branch
------
REL9_3_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/521fede166d6d8ce0c7745c169ad7c0ea49233c9

Modified Files
--------------
src/backend/rewrite/rewriteHandler.c |  31 ++++++++++
src/test/regress/expected/domain.out | 110 +++++++++++++++++++++++++++++++++--
src/test/regress/sql/domain.sql      |  48 +++++++++++++++
3 files changed, 185 insertions(+), 4 deletions(-)


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


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

* pgsql: Fix multiple assignments to a column of a domain type.
@ 2017-07-11 20:49 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2017-07-11 20:49 UTC (permalink / raw)
  To: pgsql-committers

Fix multiple assignments to a column of a domain type.

We allow INSERT and UPDATE commands to assign to the same column more than
once, as long as the assignments are to subfields or elements rather than
the whole column.  However, this failed when the target column was a domain
over array rather than plain array.  Fix by teaching process_matched_tle()
to look through CoerceToDomain nodes, and add relevant test cases.

Also add a group of test cases exercising domains over array of composite.
It's doubtless accidental that CREATE DOMAIN allows this case while not
allowing straight domain over composite; but it does, so we'd better make
sure we don't break it.  (I could not find any documentation mentioning
either side of that, so no doc changes.)

It's been like this for a long time, so back-patch to all supported
branches.

Discussion: https://postgr.es/m/4206.1499798337@sss.pgh.pa.us

Branch
------
REL9_2_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/55204850a9de72ab0a7bc7b90131d46fad7a89cd

Modified Files
--------------
src/backend/rewrite/rewriteHandler.c |  31 ++++++++++
src/test/regress/expected/domain.out | 111 +++++++++++++++++++++++++++++++++--
src/test/regress/sql/domain.sql      |  48 +++++++++++++++
3 files changed, 186 insertions(+), 4 deletions(-)


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


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


end of thread, other threads:[~2017-07-11 20:49 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-07-11 20:49 pgsql: Fix multiple assignments to a column of a domain type. Tom Lane <tgl@sss.pgh.pa.us>
2017-07-11 20:49 pgsql: Fix multiple assignments to a column of a domain type. Tom Lane <tgl@sss.pgh.pa.us>
2017-07-11 20:49 pgsql: Fix multiple assignments to a column of a domain type. Tom Lane <tgl@sss.pgh.pa.us>
2017-07-11 20:49 pgsql: Fix multiple assignments to a column of a domain type. Tom Lane <tgl@sss.pgh.pa.us>
2017-07-11 20:49 pgsql: Fix multiple assignments to a column of a domain type. Tom Lane <tgl@sss.pgh.pa.us>
2017-07-11 20:49 pgsql: Fix multiple assignments to a column of a domain type. 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