Re: SQL:2011 application time - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: SQL:2011 application time
Date
Msg-id 58b6687fe9de002e4c862a412719e4f918bad987.camel@j-davis.com
Whole thread Raw
In response to Re: SQL:2011 application time  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: SQL:2011 application time
List 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




pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Postgres and --config-file option
Next
From: "David G. Johnston"
Date:
Subject: Re: Postgres and --config-file option