pgsql: Add null test to partition constraint for default rangepartitio - Mailing list pgsql-committers

From Robert Haas
Subject pgsql: Add null test to partition constraint for default rangepartitio
Date
Msg-id E1eJiA6-0001uy-GA@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Add null test to partition constraint for default range partitions.

Non-default range partitions have a constraint which include null
tests, and both default and non-default list partitions also have a
constraint which includes null tests, but for some reason this was
missed for default range partitions.  This could cause the partition
constraint to evaluate to false for rows that were (correctly) routed
to that partition by insert tuple routing, which could in turn
cause constraint exclusion to prune the default partition in cases
where it should not.

Amit Langote, reviewed by Kyotaro Horiguchi

Discussion: http://postgr.es/m/ba7aaeb1-4399-220e-70b4-62eade1522d0@lab.ntt.co.jp

Branch
------
master

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

Modified Files
--------------
src/backend/catalog/partition.c       | 29 ++++++++++++++++++++-----
src/test/regress/expected/inherit.out | 41 +++++++++++++++++++++++------------
src/test/regress/expected/update.out  |  2 +-
src/test/regress/sql/inherit.sql      |  9 ++++----
4 files changed, 56 insertions(+), 25 deletions(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Fix typo.
Next
From: Peter Eisentraut
Date:
Subject: pgsql: PL/Python: Fix potential NULL pointer dereference