pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix daterange canonicalization for +/- infinity.
7+ messages / 1 participants
[nested] [flat]

* pgsql: Fix daterange canonicalization for +/- infinity.
@ 2019-07-18 20:48 Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Jeff Davis @ 2019-07-18 20:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix daterange canonicalization for +/- infinity.

The values 'infinity' and '-infinity' are a part of the DATE type
itself, so a bound of the date 'infinity' is not the same as an
unbounded/infinite range. However, it is still wrong to try to
canonicalize such values, because adding or subtracting one has no
effect. Fix by treating 'infinity' and '-infinity' the same as
unbounded ranges for the purposes of canonicalization (but not other
purposes).

Backpatch to all versions because it is inconsistent with the
documented behavior. Note that this could be an incompatibility for
applications relying on the behavior contrary to the documentation.

Author: Laurenz Albe
Reviewed-by: Thomas Munro
Discussion: https://postgr.es/m/77f24ea19ab802bc9bc60ddbb8977ee2d646aec1.camel%40cybertec.at
Backpatch-through: 9.4

Branch
------
master

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

Modified Files
--------------
src/backend/utils/adt/rangetypes.c       |  4 ++--
src/test/regress/expected/rangetypes.out | 24 ++++++++++++++++++++++++
src/test/regress/sql/rangetypes.sql      |  4 ++++
3 files changed, 30 insertions(+), 2 deletions(-)



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

* pgsql: Fix daterange canonicalization for +/- infinity.
@ 2019-07-18 22:03 Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Jeff Davis @ 2019-07-18 22:03 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix daterange canonicalization for +/- infinity.

The values 'infinity' and '-infinity' are a part of the DATE type
itself, so a bound of the date 'infinity' is not the same as an
unbounded/infinite range. However, it is still wrong to try to
canonicalize such values, because adding or subtracting one has no
effect. Fix by treating 'infinity' and '-infinity' the same as
unbounded ranges for the purposes of canonicalization (but not other
purposes).

Backpatch to all versions because it is inconsistent with the
documented behavior. Note that this could be an incompatibility for
applications relying on the behavior contrary to the documentation.

Author: Laurenz Albe
Reviewed-by: Thomas Munro
Discussion: https://postgr.es/m/77f24ea19ab802bc9bc60ddbb8977ee2d646aec1.camel%40cybertec.at
Backpatch-through: 9.4

Branch
------
REL_11_STABLE

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

Modified Files
--------------
src/backend/utils/adt/rangetypes.c       |  4 ++--
src/test/regress/expected/rangetypes.out | 24 ++++++++++++++++++++++++
src/test/regress/sql/rangetypes.sql      |  4 ++++
3 files changed, 30 insertions(+), 2 deletions(-)



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

* pgsql: Fix daterange canonicalization for +/- infinity.
@ 2019-07-19 00:07 Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Jeff Davis @ 2019-07-19 00:07 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix daterange canonicalization for +/- infinity.

The values 'infinity' and '-infinity' are a part of the DATE type
itself, so a bound of the date 'infinity' is not the same as an
unbounded/infinite range. However, it is still wrong to try to
canonicalize such values, because adding or subtracting one has no
effect. Fix by treating 'infinity' and '-infinity' the same as
unbounded ranges for the purposes of canonicalization (but not other
purposes).

Backpatch to all versions because it is inconsistent with the
documented behavior. Note that this could be an incompatibility for
applications relying on the behavior contrary to the documentation.

Author: Laurenz Albe
Reviewed-by: Thomas Munro
Discussion: https://postgr.es/m/77f24ea19ab802bc9bc60ddbb8977ee2d646aec1.camel%40cybertec.at
Backpatch-through: 9.4

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/955089d4d74d0dbaaa6c1e3a4652e96b6d1c2f54

Modified Files
--------------
src/backend/utils/adt/rangetypes.c       |  4 ++--
src/test/regress/expected/rangetypes.out | 24 ++++++++++++++++++++++++
src/test/regress/sql/rangetypes.sql      |  4 ++++
3 files changed, 30 insertions(+), 2 deletions(-)



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

* pgsql: Fix daterange canonicalization for +/- infinity.
@ 2019-07-19 00:07 Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Jeff Davis @ 2019-07-19 00:07 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix daterange canonicalization for +/- infinity.

The values 'infinity' and '-infinity' are a part of the DATE type
itself, so a bound of the date 'infinity' is not the same as an
unbounded/infinite range. However, it is still wrong to try to
canonicalize such values, because adding or subtracting one has no
effect. Fix by treating 'infinity' and '-infinity' the same as
unbounded ranges for the purposes of canonicalization (but not other
purposes).

Backpatch to all versions because it is inconsistent with the
documented behavior. Note that this could be an incompatibility for
applications relying on the behavior contrary to the documentation.

Author: Laurenz Albe
Reviewed-by: Thomas Munro
Discussion: https://postgr.es/m/77f24ea19ab802bc9bc60ddbb8977ee2d646aec1.camel%40cybertec.at
Backpatch-through: 9.4

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/56afeb765177ac135a2524551a148c67dc65addb

Modified Files
--------------
src/backend/utils/adt/rangetypes.c       |  4 ++--
src/test/regress/expected/rangetypes.out | 24 ++++++++++++++++++++++++
src/test/regress/sql/rangetypes.sql      |  4 ++++
3 files changed, 30 insertions(+), 2 deletions(-)



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

* pgsql: Fix daterange canonicalization for +/- infinity.
@ 2019-07-19 00:08 Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Jeff Davis @ 2019-07-19 00:08 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix daterange canonicalization for +/- infinity.

The values 'infinity' and '-infinity' are a part of the DATE type
itself, so a bound of the date 'infinity' is not the same as an
unbounded/infinite range. However, it is still wrong to try to
canonicalize such values, because adding or subtracting one has no
effect. Fix by treating 'infinity' and '-infinity' the same as
unbounded ranges for the purposes of canonicalization (but not other
purposes).

Backpatch to all versions because it is inconsistent with the
documented behavior. Note that this could be an incompatibility for
applications relying on the behavior contrary to the documentation.

Author: Laurenz Albe
Reviewed-by: Thomas Munro
Discussion: https://postgr.es/m/77f24ea19ab802bc9bc60ddbb8977ee2d646aec1.camel%40cybertec.at
Backpatch-through: 9.4

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8af1fccba2b1a46d58fad46ed8d03e8c92fe1152

Modified Files
--------------
src/backend/utils/adt/rangetypes.c       |  4 ++--
src/test/regress/expected/rangetypes.out | 24 ++++++++++++++++++++++++
src/test/regress/sql/rangetypes.sql      |  4 ++++
3 files changed, 30 insertions(+), 2 deletions(-)



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

* pgsql: Fix daterange canonicalization for +/- infinity.
@ 2019-07-19 00:09 Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Jeff Davis @ 2019-07-19 00:09 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix daterange canonicalization for +/- infinity.

The values 'infinity' and '-infinity' are a part of the DATE type
itself, so a bound of the date 'infinity' is not the same as an
unbounded/infinite range. However, it is still wrong to try to
canonicalize such values, because adding or subtracting one has no
effect. Fix by treating 'infinity' and '-infinity' the same as
unbounded ranges for the purposes of canonicalization (but not other
purposes).

Backpatch to all versions because it is inconsistent with the
documented behavior. Note that this could be an incompatibility for
applications relying on the behavior contrary to the documentation.

Author: Laurenz Albe
Reviewed-by: Thomas Munro
Discussion: https://postgr.es/m/77f24ea19ab802bc9bc60ddbb8977ee2d646aec1.camel%40cybertec.at
Backpatch-through: 9.4

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2be355498eafaddc1c274f05884e1ed79b671655

Modified Files
--------------
src/backend/utils/adt/rangetypes.c       |  4 ++--
src/test/regress/expected/rangetypes.out | 24 ++++++++++++++++++++++++
src/test/regress/sql/rangetypes.sql      |  4 ++++
3 files changed, 30 insertions(+), 2 deletions(-)



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

* pgsql: Fix daterange canonicalization for +/- infinity.
@ 2019-07-19 00:30 Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Jeff Davis @ 2019-07-19 00:30 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix daterange canonicalization for +/- infinity.

The values 'infinity' and '-infinity' are a part of the DATE type
itself, so a bound of the date 'infinity' is not the same as an
unbounded/infinite range. However, it is still wrong to try to
canonicalize such values, because adding or subtracting one has no
effect. Fix by treating 'infinity' and '-infinity' the same as
unbounded ranges for the purposes of canonicalization (but not other
purposes).

Backpatch to all versions because it is inconsistent with the
documented behavior. Note that this could be an incompatibility for
applications relying on the behavior contrary to the documentation.

Author: Laurenz Albe
Reviewed-by: Thomas Munro
Discussion: https://postgr.es/m/77f24ea19ab802bc9bc60ddbb8977ee2d646aec1.camel%40cybertec.at
Backpatch-through: 9.4

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/613eabcd51c3adec50e28c1f151d574db5a05a9e

Modified Files
--------------
src/backend/utils/adt/rangetypes.c       |  4 ++--
src/test/regress/expected/rangetypes.out | 24 ++++++++++++++++++++++++
src/test/regress/sql/rangetypes.sql      |  4 ++++
3 files changed, 30 insertions(+), 2 deletions(-)



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


end of thread, other threads:[~2019-07-19 00:30 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-07-18 20:48 pgsql: Fix daterange canonicalization for +/- infinity. Jeff Davis <jdavis@postgresql.org>
2019-07-18 22:03 pgsql: Fix daterange canonicalization for +/- infinity. Jeff Davis <jdavis@postgresql.org>
2019-07-19 00:07 pgsql: Fix daterange canonicalization for +/- infinity. Jeff Davis <jdavis@postgresql.org>
2019-07-19 00:07 pgsql: Fix daterange canonicalization for +/- infinity. Jeff Davis <jdavis@postgresql.org>
2019-07-19 00:08 pgsql: Fix daterange canonicalization for +/- infinity. Jeff Davis <jdavis@postgresql.org>
2019-07-19 00:09 pgsql: Fix daterange canonicalization for +/- infinity. Jeff Davis <jdavis@postgresql.org>
2019-07-19 00:30 pgsql: Fix daterange canonicalization for +/- infinity. Jeff Davis <jdavis@postgresql.org>

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