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

From Igor Korot
Subject Re: Comparing dates in DDL
Date
Msg-id CA+FnnTwVws6QCUAn4P6tHVkNCpddq9M7OOLN3B+27ZL80TCihg@mail.gmail.com
Whole thread Raw
In response to Comparing dates in DDL  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: Comparing dates in DDL  (Rob Sargent <robjsargent@gmail.com>)
Re: Comparing dates in DDL  (Rich Shepard <rshepard@appl-ecosys.com>)
List pgsql-general
Hi, Rich,

On Fri, Jan 4, 2019 at 10:53 AM Rich Shepard <rshepard@appl-ecosys.com> wrote:
>
>    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.

start_date.day() + 1?

Thank you.

>
> TIA,
>
> Rich
>


pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Showing table comments with psql
Next
From: Andreas Kretschmer
Date:
Subject: Re: Comparing dates in DDL