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

From David G. Johnston
Subject Re: Comparing dates in DDL
Date
Msg-id CAKFQuwY3NCk-T9FiomKeN5g+mV4Wvo2PammQf5TjV7-j7eLjwQ@mail.gmail.com
Whole thread Raw
In response to Re: Comparing dates in DDL  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: Comparing dates in DDL
List pgsql-general
On Fri, Jan 4, 2019 at 2:21 PM Rich Shepard <rshepard@appl-ecosys.com> wrote:
>    Thinking more about duration perhaps I'm seeing a problem that really does
> not exist: it's a single column for both dates in the table while the UI
> needs separate date data entry widgets. Unless I use middleware code when a
> project row is first entered I am not seeing how two discrete dates are
> combined with sqlalchemy inserts them into the table.

That would be the decision to make - does your toolkit support (or can
be made to support) the type and are you willing to choose a
sub-optimal database model because one or more applications happen to
do things differently?

IMO the daterange datatype is the best type you can choose for the
model; now you have to figure out and decide where any tradeoffs are
and if they are worth it given your specific circumstances.

David J.


pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Re: Comparing dates in DDL
Next
From: Rich Shepard
Date:
Subject: Re: Comparing dates in DDL