pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix typcache's failure to treat ranges as container types.
7+ messages / 1 participants
[nested] [flat]

* pgsql: Fix typcache's failure to treat ranges as container types.
@ 2017-10-20 21:12 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2017-10-20 21:12 UTC (permalink / raw)
  To: pgsql-committers

Fix typcache's failure to treat ranges as container types.

Like the similar logic for arrays and records, it's necessary to examine
the range's subtype to decide whether the range type can support hashing.
We can omit checking the subtype for btree-defined operations, though,
since range subtypes are required to have those operations.  (Possibly
that simplification for btree cases led us to overlook that it does
not apply for hash cases.)

This is only an issue if the subtype lacks hash support, which is not
true of any built-in range type, but it's easy to demonstrate a problem
with a range type over, eg, money: you can get a "could not identify
a hash function" failure when the planner is misled into thinking that
hash join or aggregation would work.

This was born broken, so back-patch to all supported branches.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/36ea99c84d856177ec307307788a279cc600566e

Modified Files
--------------
src/backend/utils/cache/typcache.c       | 90 ++++++++++++++++++++++++++++++--
src/test/regress/expected/rangetypes.out | 12 +++++
src/test/regress/sql/rangetypes.sql      | 12 +++++
3 files changed, 109 insertions(+), 5 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] 7+ messages in thread

* pgsql: Fix typcache's failure to treat ranges as container types.
@ 2017-10-20 21:12 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2017-10-20 21:12 UTC (permalink / raw)
  To: pgsql-committers

Fix typcache's failure to treat ranges as container types.

Like the similar logic for arrays and records, it's necessary to examine
the range's subtype to decide whether the range type can support hashing.
We can omit checking the subtype for btree-defined operations, though,
since range subtypes are required to have those operations.  (Possibly
that simplification for btree cases led us to overlook that it does
not apply for hash cases.)

This is only an issue if the subtype lacks hash support, which is not
true of any built-in range type, but it's easy to demonstrate a problem
with a range type over, eg, money: you can get a "could not identify
a hash function" failure when the planner is misled into thinking that
hash join or aggregation would work.

This was born broken, so back-patch to all supported branches.

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7a5f8de5525a861af5917c73e78efe15ea3e1bb2

Modified Files
--------------
src/backend/utils/cache/typcache.c       | 50 ++++++++++++++++++++++++++++++++
src/test/regress/expected/rangetypes.out | 12 ++++++++
src/test/regress/sql/rangetypes.sql      | 12 ++++++++
3 files changed, 74 insertions(+)


-- 
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] 7+ messages in thread

* pgsql: Fix typcache's failure to treat ranges as container types.
@ 2017-10-20 21:12 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2017-10-20 21:12 UTC (permalink / raw)
  To: pgsql-committers

Fix typcache's failure to treat ranges as container types.

Like the similar logic for arrays and records, it's necessary to examine
the range's subtype to decide whether the range type can support hashing.
We can omit checking the subtype for btree-defined operations, though,
since range subtypes are required to have those operations.  (Possibly
that simplification for btree cases led us to overlook that it does
not apply for hash cases.)

This is only an issue if the subtype lacks hash support, which is not
true of any built-in range type, but it's easy to demonstrate a problem
with a range type over, eg, money: you can get a "could not identify
a hash function" failure when the planner is misled into thinking that
hash join or aggregation would work.

This was born broken, so back-patch to all supported branches.

Branch
------
REL9_6_STABLE

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

Modified Files
--------------
src/backend/utils/cache/typcache.c       | 50 ++++++++++++++++++++++++++++++++
src/test/regress/expected/rangetypes.out | 12 ++++++++
src/test/regress/sql/rangetypes.sql      | 12 ++++++++
3 files changed, 74 insertions(+)


-- 
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] 7+ messages in thread

* pgsql: Fix typcache's failure to treat ranges as container types.
@ 2017-10-20 21:12 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2017-10-20 21:12 UTC (permalink / raw)
  To: pgsql-committers

Fix typcache's failure to treat ranges as container types.

Like the similar logic for arrays and records, it's necessary to examine
the range's subtype to decide whether the range type can support hashing.
We can omit checking the subtype for btree-defined operations, though,
since range subtypes are required to have those operations.  (Possibly
that simplification for btree cases led us to overlook that it does
not apply for hash cases.)

This is only an issue if the subtype lacks hash support, which is not
true of any built-in range type, but it's easy to demonstrate a problem
with a range type over, eg, money: you can get a "could not identify
a hash function" failure when the planner is misled into thinking that
hash join or aggregation would work.

This was born broken, so back-patch to all supported branches.

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/63fbc51e396d60429345c4a0856b6a7197198344

Modified Files
--------------
src/backend/utils/cache/typcache.c       | 50 ++++++++++++++++++++++++++++++++
src/test/regress/expected/rangetypes.out | 12 ++++++++
src/test/regress/sql/rangetypes.sql      | 12 ++++++++
3 files changed, 74 insertions(+)


-- 
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] 7+ messages in thread

* pgsql: Fix typcache's failure to treat ranges as container types.
@ 2017-10-20 21:12 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2017-10-20 21:12 UTC (permalink / raw)
  To: pgsql-committers

Fix typcache's failure to treat ranges as container types.

Like the similar logic for arrays and records, it's necessary to examine
the range's subtype to decide whether the range type can support hashing.
We can omit checking the subtype for btree-defined operations, though,
since range subtypes are required to have those operations.  (Possibly
that simplification for btree cases led us to overlook that it does
not apply for hash cases.)

This is only an issue if the subtype lacks hash support, which is not
true of any built-in range type, but it's easy to demonstrate a problem
with a range type over, eg, money: you can get a "could not identify
a hash function" failure when the planner is misled into thinking that
hash join or aggregation would work.

This was born broken, so back-patch to all supported branches.

Branch
------
REL9_4_STABLE

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

Modified Files
--------------
src/backend/utils/cache/typcache.c       | 50 ++++++++++++++++++++++++++++++++
src/test/regress/expected/rangetypes.out | 12 ++++++++
src/test/regress/sql/rangetypes.sql      | 12 ++++++++
3 files changed, 74 insertions(+)


-- 
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] 7+ messages in thread

* pgsql: Fix typcache's failure to treat ranges as container types.
@ 2017-10-20 21:12 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2017-10-20 21:12 UTC (permalink / raw)
  To: pgsql-committers

Fix typcache's failure to treat ranges as container types.

Like the similar logic for arrays and records, it's necessary to examine
the range's subtype to decide whether the range type can support hashing.
We can omit checking the subtype for btree-defined operations, though,
since range subtypes are required to have those operations.  (Possibly
that simplification for btree cases led us to overlook that it does
not apply for hash cases.)

This is only an issue if the subtype lacks hash support, which is not
true of any built-in range type, but it's easy to demonstrate a problem
with a range type over, eg, money: you can get a "could not identify
a hash function" failure when the planner is misled into thinking that
hash join or aggregation would work.

This was born broken, so back-patch to all supported branches.

Branch
------
REL9_3_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7c70a129ef030220748060e9fc7c5c916a9c70da

Modified Files
--------------
src/backend/utils/cache/typcache.c       | 50 ++++++++++++++++++++++++++++++++
src/test/regress/expected/rangetypes.out | 12 ++++++++
src/test/regress/sql/rangetypes.sql      | 12 ++++++++
3 files changed, 74 insertions(+)


-- 
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] 7+ messages in thread

* pgsql: Fix typcache's failure to treat ranges as container types.
@ 2017-10-20 21:12 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2017-10-20 21:12 UTC (permalink / raw)
  To: pgsql-committers

Fix typcache's failure to treat ranges as container types.

Like the similar logic for arrays and records, it's necessary to examine
the range's subtype to decide whether the range type can support hashing.
We can omit checking the subtype for btree-defined operations, though,
since range subtypes are required to have those operations.  (Possibly
that simplification for btree cases led us to overlook that it does
not apply for hash cases.)

This is only an issue if the subtype lacks hash support, which is not
true of any built-in range type, but it's easy to demonstrate a problem
with a range type over, eg, money: you can get a "could not identify
a hash function" failure when the planner is misled into thinking that
hash join or aggregation would work.

This was born broken, so back-patch to all supported branches.

Branch
------
REL9_2_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0270ad1f7474249f993a825d8e15f09666a900eb

Modified Files
--------------
src/backend/utils/cache/typcache.c       | 50 ++++++++++++++++++++++++++++++++
src/test/regress/expected/rangetypes.out | 12 ++++++++
src/test/regress/sql/rangetypes.sql      | 12 ++++++++
3 files changed, 74 insertions(+)


-- 
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] 7+ messages in thread


end of thread, other threads:[~2017-10-20 21:12 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-10-20 21:12 pgsql: Fix typcache's failure to treat ranges as container types. Tom Lane <tgl@sss.pgh.pa.us>
2017-10-20 21:12 pgsql: Fix typcache's failure to treat ranges as container types. Tom Lane <tgl@sss.pgh.pa.us>
2017-10-20 21:12 pgsql: Fix typcache's failure to treat ranges as container types. Tom Lane <tgl@sss.pgh.pa.us>
2017-10-20 21:12 pgsql: Fix typcache's failure to treat ranges as container types. Tom Lane <tgl@sss.pgh.pa.us>
2017-10-20 21:12 pgsql: Fix typcache's failure to treat ranges as container types. Tom Lane <tgl@sss.pgh.pa.us>
2017-10-20 21:12 pgsql: Fix typcache's failure to treat ranges as container types. Tom Lane <tgl@sss.pgh.pa.us>
2017-10-20 21:12 pgsql: Fix typcache's failure to treat ranges as container types. 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