Re: Comparing dates in DDL - Mailing list pgsql-general

From Rob Sargent
Subject Re: Comparing dates in DDL
Date
Msg-id 55d28758-0b55-5d91-83fc-7b601eaa3d02@gmail.com
Whole thread Raw
In response to Re: Comparing dates in DDL  (Rich Shepard <rshepard@appl-ecosys.com>)
List pgsql-general
On 1/4/19 10:26 AM, Rich Shepard wrote:
> On Fri, 4 Jan 2019, Rob Sargent wrote:
>
>> Is the end_date always knowable at record insert?
>
> Rob,
>
>   Not always. Sometimes projects have known end dates, other times the 
> end
> is interminate until it happens.
>
>> CHECK(end_date is null or start_date <= end_date)
>
>   So a default of NULL should be applied, or just allowed to happen?
>
> Thanks,
>
> Rich
>
This is exactly what null is for.  Much preferable to some arbitrary 
value which will confuse analyses.


pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Comparing dates in DDL
Next
From: Rich Shepard
Date:
Subject: Re: Comparing dates in DDL