Re: Comparing dates in DDL

Поиск
Список
Период
Сортировка
От Rob Sargent
Тема Re: Comparing dates in DDL
Дата
Msg-id 55d28758-0b55-5d91-83fc-7b601eaa3d02@gmail.com
обсуждение исходный текст
Ответ на Re: Comparing dates in DDL  (Rich Shepard <rshepard@appl-ecosys.com>)
Список 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 по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Comparing dates in DDL
Следующее
От: Rich Shepard
Дата:
Сообщение: Re: Comparing dates in DDL