Re: Comparing dates in DDL

From: Andreas Kretschmer <andreas(at)a-kretschmer(dot)de>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Comparing dates in DDL
Date: 2019-01-04 20:30:54
Message-ID: 48966021-25ea-2ba3-32bd-9537859e01a4@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ken Benson 2019-01-04 20:44:34 32-bit supporting binaries for version 11
Previous Message Rich Shepard 2019-01-04 17:59:59 Re: Comparing dates in DDL