From: Pankaj Jangid <pankaj.jangid@gmail.com>
To: Steve Baldwin <steve.baldwin@gmail.com>
Cc: Michael Lewis <mlewis@entrata.com>
Cc: stan <stanb@panix.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Storing a time interval
Date: Sat, 09 Nov 2019 13:28:18 +0530
Message-ID: <m28sopqy5h.fsf@gmail.com> (raw)
In-Reply-To: <CAKE1Aib_+NhhD69Pdej-YOCuetq5NeKYAGc67z-Pruu24AZTmw@mail.gmail.com>
References: <20191108194307.GA16920@panix.com>
<CAHOFxGpt1FG4W0RpXY7HCYebw3=_+c=ZBFcDEWaS+uzC2Q+u3w@mail.gmail.com>
<143433ed-b3f2-2749-4ae8-d282dcb7f3ce@aklaver.com>
<20191108203849.GA5401@panix.com>
<CAHOFxGp8C=F2v0zLurSWMXaSkKzTXbN7ZbeNHmAR4vXWu7ciGg@mail.gmail.com>
<CAKE1Aib_+NhhD69Pdej-YOCuetq5NeKYAGc67z-Pruu24AZTmw@mail.gmail.com>
Steve Baldwin <steve.baldwin@gmail.com> writes:
> I agree with Michael. Another consideration is how the composite type is
> going to be handled in the DB layer of your processing code (e.g. node,
> python, ...). In the scenario you described it seems unlikely you will be
> either having multiple columns of that type on your PO table, or using that
> composite type on a different table, so apart from the 'interest' factor,
> I'm not seeing any practical benefit. Composite types are also slightly
> painful in the change they bring to the way you reference them. For example
> typically you need to surround the outer column in brackets - e.g.
> (dates).discount_last_date. If you are using an ORM library, does it know
> how to deal with that?
>
I faced a similar issue when using Enums with with rust lang. The Diesel
ORM didn't support it directly. Had to struggle with custom code in the
Model layer.
--
Pankaj Jangid
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: pankaj.jangid@gmail.com, steve.baldwin@gmail.com, mlewis@entrata.com, stanb@panix.com, adrian.klaver@aklaver.com
Subject: Re: Storing a time interval
In-Reply-To: <m28sopqy5h.fsf@gmail.com>
References: <20191108194307.GA16920@panix.com> <CAHOFxGpt1FG4W0RpXY7HCYebw3=_+c=ZBFcDEWaS+uzC2Q+u3w@mail.gmail.com> <143433ed-b3f2-2749-4ae8-d282dcb7f3ce@aklaver.com> <20191108203849.GA5401@panix.com> <CAHOFxGp8C=F2v0zLurSWMXaSkKzTXbN7ZbeNHmAR4vXWu7ciGg@mail.gmail.com> <CAKE1Aib_+NhhD69Pdej-YOCuetq5NeKYAGc67z-Pruu24AZTmw@mail.gmail.com> <m28sopqy5h.fsf@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox