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

From Andreas Kretschmer
Subject Re: Comparing dates in DDL
Date
Msg-id 48966021-25ea-2ba3-32bd-9537859e01a4@a-kretschmer.de
Whole thread Raw
In response to Re: Comparing dates in DDL  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: Comparing dates in DDL  (Rich Shepard <rshepard@appl-ecosys.com>)
List pgsql-general

Am 04.01.19 um 18:32 schrieb Rich Shepard:
>> other solution for such 2 fields: you can use DATERANGE, only one field.
>
>   Only if all projects have a known end_date; some don't.

that's not a problem:

test=*# create table projects(duration daterange default 
daterange(current_date,null) check(lower(duration) is not null));
CREATE TABLE


Regards, Andreas

-- 
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com



pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Re: Comparing dates in DDL
Next
From: Ken Benson
Date:
Subject: 32-bit supporting binaries for version 11