Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iTAA5-00065j-Io for pgsql-general@arkaria.postgresql.org; Fri, 08 Nov 2019 19:43:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iTAA4-00012i-BL for pgsql-general@arkaria.postgresql.org; Fri, 08 Nov 2019 19:43:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iTAA3-00012b-Uw for pgsql-general@lists.postgresql.org; Fri, 08 Nov 2019 19:43:12 +0000 Received: from mailbackend.panix.com ([166.84.1.89]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iTAA1-0001gD-7i for pgsql-general@lists.postgresql.org; Fri, 08 Nov 2019 19:43:10 +0000 Received: from panix2.panix.com (panix2.panix.com [166.84.1.2]) by mailbackend.panix.com (Postfix) with ESMTP id 478rKR5RF9zqPS for ; Fri, 8 Nov 2019 14:43:07 -0500 (EST) Received: by panix2.panix.com (Postfix, from userid 17622) id 478rKR3lhgz1ZVj; Fri, 8 Nov 2019 14:43:07 -0500 (EST) Date: Fri, 8 Nov 2019 14:43:07 -0500 From: stan To: pgsql-general@lists.postgresql.org Subject: Storing a time interval Message-ID: <20191108194307.GA16920@panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Editor: gVim User-Agent: Mutt/1.12.1 (2019-06-15) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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