From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
---|---|
To: | Peter Eisentraut <peter(at)eisentraut(dot)org>, Paul Jungwirth <pj(at)illuminatedcomputing(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: SQL:2011 application time |
Date: | 2024-05-16 23:22:35 |
Message-ID: | 58b6687fe9de002e4c862a412719e4f918bad987.camel@j-davis.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, 2024-05-13 at 12:11 +0200, Peter Eisentraut wrote:
> Some of these issues might be design flaws in the underlying
> mechanisms,
> like range types and exclusion constraints. Like, if you're supposed
> to
> use this for scheduling but you can use empty ranges to bypass
> exclusion
> constraints, how is one supposed to use this?
An empty range does not "bypass" the an exclusion constraint. The
exclusion constraint has a documented meaning and it's enforced.
Of course there are situations where an empty range doesn't make a lot
of sense. For many domains zero doesn't make any sense, either.
Consider receiving an email saying "thank you for purchasing 0
widgets!". Check constraints seem like a reasonable way to prevent
those kinds of problems.
Regards,
Jeff Davis
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2024-05-16 23:38:28 | Re: Postgres and --config-file option |
Previous Message | Michael Paquier | 2024-05-16 23:11:17 | Re: Postgres and --config-file option |