Comparing dates in DDL

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Comparing dates in DDL
Date: 2019-01-04 16:53:19
Message-ID: alpine.LNX.2.20.1901040851090.29312@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a projects table that includes these two columns:

start_date date DEFAULT CURRENT_DATE,
end_date date
CONSTRAINT valid_start_date
CHECK (start_date <= end_date),

1. Do I need a DEFAULT value for the end_date?
2. If so, please suggest a value for it.

TIA,

Rich

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2019-01-04 17:00:08 Re: Showing table comments with psql
Previous Message Pavel Stehule 2019-01-04 16:47:47 Re: Potentially undocumented behaviour change in Postgres 11 concerning OLD record in an after insert trigger