Storing a time interval

From: stan <stanb(at)panix(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Storing a time interval
Date: 2019-11-08 19:43:07
Message-ID: 20191108194307.GA16920@panix.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I need to create a table to store terms and conditions for purchase
orders.

Some of the attributes of a PO include payment terms. Quite often these will
be 2 periods associated with these, the first is a period on which if you
pay, you receive a discount, and the 2nd is when payment is due with no
discount. I am thinking of storing these two attributes as time internals.

What is the wisdom as to how to declare the type of these columns?

--
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
-- Benjamin Franklin

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Olivier Gautherot 2019-11-08 19:43:10 pg_logical for RHEL 8
Previous Message Brad Nicholson 2019-11-08 16:59:00 Re: AW: AW: AW: AW: AW: AW: AW: broken backup trail in case of quickly patroni switchback and forth