Re: Comparing dates in DDL

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Comparing dates in DDL
Date: 2019-01-04 21:52:26
Message-ID: CAKFQuwY3NCk-T9FiomKeN5g+mV4Wvo2PammQf5TjV7-j7eLjwQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jan 4, 2019 at 2:21 PM Rich Shepard <rshepard(at)appl-ecosys(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2019-01-04 22:19:07 Re: Comparing dates in DDL
Previous Message Rich Shepard 2019-01-04 21:21:30 Re: Comparing dates in DDL