pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix CheckAttributeType's handling of collations for ranges.
7+ messages / 1 participants
[nested] [flat]

* pgsql: Fix CheckAttributeType's handling of collations for ranges.
@ 2020-01-31 22:04 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-01-31 22:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix CheckAttributeType's handling of collations for ranges.

Commit fc7695891 changed CheckAttributeType to recurse into ranges,
but made it pass down the wrong collation (always InvalidOid, since
ranges as such have no collation).  This would result in guaranteed
failure when considering a range type whose subtype is collatable.

Embarrassingly, we lack any regression tests that would expose such
a problem (but fortunately, somebody noticed before we shipped this
bug in any release).

Fix it to pass down the range's subtype collation property instead,
and add some regression test cases to exercise collatable-subtype
ranges a bit more.  Back-patch to all supported branches, as the
previous patch was.

Report and patch by Julien Rouhaud, test cases tweaked by me

Discussion: https://postgr.es/m/CAOBaU_aBWqNweiGUFX0guzBKkcfJ8mnnyyGC_KBQmO12Mj5f_A@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/74b35eb468dcf353e25afd4acfc7ee2b2022d6b6

Modified Files
--------------
src/backend/catalog/heap.c                 |  3 +-
src/backend/utils/cache/lsyscache.c        | 26 +++++++++
src/include/utils/lsyscache.h              |  1 +
src/test/regress/expected/rangetypes.out   | 89 +++++++++++++++++++++++++++++-
src/test/regress/expected/sanity_check.out |  2 +
src/test/regress/sql/rangetypes.sql        | 30 +++++++++-
6 files changed, 148 insertions(+), 3 deletions(-)



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

* pgsql: Fix CheckAttributeType's handling of collations for ranges.
@ 2020-01-31 22:04 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-01-31 22:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix CheckAttributeType's handling of collations for ranges.

Commit fc7695891 changed CheckAttributeType to recurse into ranges,
but made it pass down the wrong collation (always InvalidOid, since
ranges as such have no collation).  This would result in guaranteed
failure when considering a range type whose subtype is collatable.

Embarrassingly, we lack any regression tests that would expose such
a problem (but fortunately, somebody noticed before we shipped this
bug in any release).

Fix it to pass down the range's subtype collation property instead,
and add some regression test cases to exercise collatable-subtype
ranges a bit more.  Back-patch to all supported branches, as the
previous patch was.

Report and patch by Julien Rouhaud, test cases tweaked by me

Discussion: https://postgr.es/m/CAOBaU_aBWqNweiGUFX0guzBKkcfJ8mnnyyGC_KBQmO12Mj5f_A@mail.gmail.com

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/65aa155135a5c7c913bcb042c51d72eaad53582f

Modified Files
--------------
src/backend/catalog/heap.c                 |  3 +-
src/backend/utils/cache/lsyscache.c        | 26 +++++++++
src/include/utils/lsyscache.h              |  1 +
src/test/regress/expected/rangetypes.out   | 89 +++++++++++++++++++++++++++++-
src/test/regress/expected/sanity_check.out |  2 +
src/test/regress/sql/rangetypes.sql        | 30 +++++++++-
6 files changed, 148 insertions(+), 3 deletions(-)



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

* pgsql: Fix CheckAttributeType's handling of collations for ranges.
@ 2020-01-31 22:04 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-01-31 22:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix CheckAttributeType's handling of collations for ranges.

Commit fc7695891 changed CheckAttributeType to recurse into ranges,
but made it pass down the wrong collation (always InvalidOid, since
ranges as such have no collation).  This would result in guaranteed
failure when considering a range type whose subtype is collatable.

Embarrassingly, we lack any regression tests that would expose such
a problem (but fortunately, somebody noticed before we shipped this
bug in any release).

Fix it to pass down the range's subtype collation property instead,
and add some regression test cases to exercise collatable-subtype
ranges a bit more.  Back-patch to all supported branches, as the
previous patch was.

Report and patch by Julien Rouhaud, test cases tweaked by me

Discussion: https://postgr.es/m/CAOBaU_aBWqNweiGUFX0guzBKkcfJ8mnnyyGC_KBQmO12Mj5f_A@mail.gmail.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/25dc267a1be573c36c4e40dce651ae462f17eb9e

Modified Files
--------------
src/backend/catalog/heap.c                 |  3 +-
src/backend/utils/cache/lsyscache.c        | 26 +++++++++
src/include/utils/lsyscache.h              |  1 +
src/test/regress/expected/rangetypes.out   | 89 +++++++++++++++++++++++++++++-
src/test/regress/expected/sanity_check.out |  2 +
src/test/regress/sql/rangetypes.sql        | 30 +++++++++-
6 files changed, 148 insertions(+), 3 deletions(-)



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

* pgsql: Fix CheckAttributeType's handling of collations for ranges.
@ 2020-01-31 22:04 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-01-31 22:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix CheckAttributeType's handling of collations for ranges.

Commit fc7695891 changed CheckAttributeType to recurse into ranges,
but made it pass down the wrong collation (always InvalidOid, since
ranges as such have no collation).  This would result in guaranteed
failure when considering a range type whose subtype is collatable.

Embarrassingly, we lack any regression tests that would expose such
a problem (but fortunately, somebody noticed before we shipped this
bug in any release).

Fix it to pass down the range's subtype collation property instead,
and add some regression test cases to exercise collatable-subtype
ranges a bit more.  Back-patch to all supported branches, as the
previous patch was.

Report and patch by Julien Rouhaud, test cases tweaked by me

Discussion: https://postgr.es/m/CAOBaU_aBWqNweiGUFX0guzBKkcfJ8mnnyyGC_KBQmO12Mj5f_A@mail.gmail.com

Branch
------
REL_10_STABLE

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

Modified Files
--------------
src/backend/catalog/heap.c                 |  3 +-
src/backend/utils/cache/lsyscache.c        | 26 +++++++++
src/include/utils/lsyscache.h              |  1 +
src/test/regress/expected/rangetypes.out   | 89 +++++++++++++++++++++++++++++-
src/test/regress/expected/sanity_check.out |  2 +
src/test/regress/sql/rangetypes.sql        | 30 +++++++++-
6 files changed, 148 insertions(+), 3 deletions(-)



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

* pgsql: Fix CheckAttributeType's handling of collations for ranges.
@ 2020-01-31 22:04 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-01-31 22:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix CheckAttributeType's handling of collations for ranges.

Commit fc7695891 changed CheckAttributeType to recurse into ranges,
but made it pass down the wrong collation (always InvalidOid, since
ranges as such have no collation).  This would result in guaranteed
failure when considering a range type whose subtype is collatable.

Embarrassingly, we lack any regression tests that would expose such
a problem (but fortunately, somebody noticed before we shipped this
bug in any release).

Fix it to pass down the range's subtype collation property instead,
and add some regression test cases to exercise collatable-subtype
ranges a bit more.  Back-patch to all supported branches, as the
previous patch was.

Report and patch by Julien Rouhaud, test cases tweaked by me

Discussion: https://postgr.es/m/CAOBaU_aBWqNweiGUFX0guzBKkcfJ8mnnyyGC_KBQmO12Mj5f_A@mail.gmail.com

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/742c646c198756ffb3fbe36c3c36715ca8048d77

Modified Files
--------------
src/backend/catalog/heap.c                 |  3 +-
src/backend/utils/cache/lsyscache.c        | 26 +++++++++
src/include/utils/lsyscache.h              |  1 +
src/test/regress/expected/rangetypes.out   | 89 +++++++++++++++++++++++++++++-
src/test/regress/expected/sanity_check.out |  2 +
src/test/regress/sql/rangetypes.sql        | 30 +++++++++-
6 files changed, 148 insertions(+), 3 deletions(-)



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

* pgsql: Fix CheckAttributeType's handling of collations for ranges.
@ 2020-01-31 22:04 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-01-31 22:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix CheckAttributeType's handling of collations for ranges.

Commit fc7695891 changed CheckAttributeType to recurse into ranges,
but made it pass down the wrong collation (always InvalidOid, since
ranges as such have no collation).  This would result in guaranteed
failure when considering a range type whose subtype is collatable.

Embarrassingly, we lack any regression tests that would expose such
a problem (but fortunately, somebody noticed before we shipped this
bug in any release).

Fix it to pass down the range's subtype collation property instead,
and add some regression test cases to exercise collatable-subtype
ranges a bit more.  Back-patch to all supported branches, as the
previous patch was.

Report and patch by Julien Rouhaud, test cases tweaked by me

Discussion: https://postgr.es/m/CAOBaU_aBWqNweiGUFX0guzBKkcfJ8mnnyyGC_KBQmO12Mj5f_A@mail.gmail.com

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/59047b6d0c93db208a40a77a3672cbe10b7b04da

Modified Files
--------------
src/backend/catalog/heap.c                 |  3 +-
src/backend/utils/cache/lsyscache.c        | 26 +++++++++
src/include/utils/lsyscache.h              |  1 +
src/test/regress/expected/rangetypes.out   | 89 +++++++++++++++++++++++++++++-
src/test/regress/expected/sanity_check.out |  2 +
src/test/regress/sql/rangetypes.sql        | 30 +++++++++-
6 files changed, 148 insertions(+), 3 deletions(-)



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

* pgsql: Fix CheckAttributeType's handling of collations for ranges.
@ 2020-01-31 22:04 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-01-31 22:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix CheckAttributeType's handling of collations for ranges.

Commit fc7695891 changed CheckAttributeType to recurse into ranges,
but made it pass down the wrong collation (always InvalidOid, since
ranges as such have no collation).  This would result in guaranteed
failure when considering a range type whose subtype is collatable.

Embarrassingly, we lack any regression tests that would expose such
a problem (but fortunately, somebody noticed before we shipped this
bug in any release).

Fix it to pass down the range's subtype collation property instead,
and add some regression test cases to exercise collatable-subtype
ranges a bit more.  Back-patch to all supported branches, as the
previous patch was.

Report and patch by Julien Rouhaud, test cases tweaked by me

Discussion: https://postgr.es/m/CAOBaU_aBWqNweiGUFX0guzBKkcfJ8mnnyyGC_KBQmO12Mj5f_A@mail.gmail.com

Branch
------
REL9_4_STABLE

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

Modified Files
--------------
src/backend/catalog/heap.c                 |  3 +-
src/backend/utils/cache/lsyscache.c        | 26 +++++++++
src/include/utils/lsyscache.h              |  1 +
src/test/regress/expected/rangetypes.out   | 89 +++++++++++++++++++++++++++++-
src/test/regress/expected/sanity_check.out |  2 +
src/test/regress/sql/rangetypes.sql        | 30 +++++++++-
6 files changed, 148 insertions(+), 3 deletions(-)



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


end of thread, other threads:[~2020-01-31 22:04 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-01-31 22:04 pgsql: Fix CheckAttributeType's handling of collations for ranges. Tom Lane <tgl@sss.pgh.pa.us>
2020-01-31 22:04 pgsql: Fix CheckAttributeType's handling of collations for ranges. Tom Lane <tgl@sss.pgh.pa.us>
2020-01-31 22:04 pgsql: Fix CheckAttributeType's handling of collations for ranges. Tom Lane <tgl@sss.pgh.pa.us>
2020-01-31 22:04 pgsql: Fix CheckAttributeType's handling of collations for ranges. Tom Lane <tgl@sss.pgh.pa.us>
2020-01-31 22:04 pgsql: Fix CheckAttributeType's handling of collations for ranges. Tom Lane <tgl@sss.pgh.pa.us>
2020-01-31 22:04 pgsql: Fix CheckAttributeType's handling of collations for ranges. Tom Lane <tgl@sss.pgh.pa.us>
2020-01-31 22:04 pgsql: Fix CheckAttributeType's handling of collations for ranges. 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