From: | PG Doc comments form <noreply(at)postgresql(dot)org> |
---|---|
To: | pgsql-docs(at)lists(dot)postgresql(dot)org |
Cc: | hmoustaid(dot)mships(at)gmail(dot)com |
Subject: | constraint_exclusion not working correctly |
Date: | 2024-08-14 15:28:59 |
Message-ID: | 172364933910.395942.11462602571152584372@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/16/ddl-partitioning.html
Description:
Hello,
I have noted that, in order for constraint exclusion to work correctly when
partitioning using inheritance, we must use simple comparisons in check
constraints (e.g., =, >=, <=, BETWEEN, etc.). If conditions are combined
using AND or OR, unnecessary partitions may be scanned.
Therefore, the example in this PostgreSQL documentation will not work
properly with constraints like CHECK (logdate >= DATE '2006-02-01' AND
logdate < DATE '2006-03-01'). However, it will work with the BETWEEN
operator.
Regards
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-08-16 02:26:19 | Re: constraint_exclusion not working correctly |
Previous Message | David Rowley | 2024-08-12 02:19:06 | Re: A minor bug in doc. Hovering over heading shows # besides it. |