pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Change bms_add_range to be a no-op for empty ranges
2+ messages / 1 participants
[nested] [flat]

* pgsql: Change bms_add_range to be a no-op for empty ranges
@ 2018-07-30 22:50 Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2018-07-30 22:50 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Change bms_add_range to be a no-op for empty ranges

In commit 84940644de93, bms_add_range was added with an API to fail with
an error if an empty range was specified.  This seems arbitrary and
unhelpful, so turn that case into a no-op instead.  Callers that require
further verification on the arguments or result can apply them by
themselves.

This fixes the bug that partition pruning throws an API error for a case
involving the default partition of a default partition, as in the
included test case.

Reported-by: Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>
Diagnosed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/16590.1532622503@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1b68010518c9d2ede24e6c721a9c0dc82c358fb1

Modified Files
--------------
src/backend/nodes/bitmapset.c                 |  7 +++++--
src/test/regress/expected/partition_prune.out | 15 +++++++++++++++
src/test/regress/sql/partition_prune.sql      |  7 +++++++
3 files changed, 27 insertions(+), 2 deletions(-)



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

* pgsql: Change bms_add_range to be a no-op for empty ranges
@ 2018-07-30 22:50 Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2018-07-30 22:50 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Change bms_add_range to be a no-op for empty ranges

In commit 84940644de93, bms_add_range was added with an API to fail with
an error if an empty range was specified.  This seems arbitrary and
unhelpful, so turn that case into a no-op instead.  Callers that require
further verification on the arguments or result can apply them by
themselves.

This fixes the bug that partition pruning throws an API error for a case
involving the default partition of a default partition, as in the
included test case.

Reported-by: Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>
Diagnosed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/16590.1532622503@sss.pgh.pa.us

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/192d1bbf99699de76473184c57fff9ff4b4246f4

Modified Files
--------------
src/backend/nodes/bitmapset.c                 |  7 +++++--
src/test/regress/expected/partition_prune.out | 15 +++++++++++++++
src/test/regress/sql/partition_prune.sql      |  7 +++++++
3 files changed, 27 insertions(+), 2 deletions(-)



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


end of thread, other threads:[~2018-07-30 22:50 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-07-30 22:50 pgsql: Change bms_add_range to be a no-op for empty ranges Alvaro Herrera <alvherre@alvh.no-ip.org>
2018-07-30 22:50 pgsql: Change bms_add_range to be a no-op for empty ranges Alvaro Herrera <alvherre@alvh.no-ip.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