Re: Comparing dates in DDL

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Rob Sargent <robjsargent(at)gmail(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Comparing dates in DDL
Date: 2019-01-04 17:24:12
Message-ID: CAKFQuwaQn2n7a2pR2+7UvvwNY-VneOpWNwW+sqwmxEwsW++YWA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Friday, January 4, 2019, Rob Sargent <robjsargent(at)gmail(dot)com> wrote:
>
> CHECK(end_date is null or start_date <= end_date)
>

The is null expression is redundant since check constraints pass when the
result is unknown.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message legrand legrand 2019-01-04 17:25:17 Re: (Again) Column Store on PostGreSQL
Previous Message Rich Shepard 2019-01-04 17:21:52 Re: Comparing dates in DDL