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 1gfZMv-0001eG-6A for pgsql-general@arkaria.postgresql.org; Fri, 04 Jan 2019 23:59: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 1gfZMt-0006ih-To for pgsql-general@arkaria.postgresql.org; Fri, 04 Jan 2019 23:59:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gfZMt-0006ia-Li for pgsql-general@lists.postgresql.org; Fri, 04 Jan 2019 23:59:11 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gfZMr-0003ws-Dr for pgsql-general@lists.postgresql.org; Fri, 04 Jan 2019 23:59:11 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 4AF0E9934E for ; Fri, 4 Jan 2019 15:59:07 -0800 (PST) Date: Fri, 4 Jan 2019 15:59:07 -0800 (PST) From: Rich Shepard To: "pgsql-generallists.postgresql.org" Subject: Re: Comparing dates in DDL In-Reply-To: Message-ID: References: <48966021-25ea-2ba3-32bd-9537859e01a4@a-kretschmer.de> User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, 4 Jan 2019, Jeremy Finzel wrote: > Another suggestion which hasn’t been mentioned is using ‘infinity’ as the > end date. I like this because it IMO indicates that the record is clearly > the current valid record more than null. Jeremy, I believe that infinity was mentioned in this thread. > But I’m not sure exactly what you are trying to do either. If you are > creating a new record with changes and closing (ending) the range of the > original record, then a GIST exclusion index would ensure you have no > overlapping date ranges for all historical records put together. Having overlapping date ranges in a projects table is a Good Thing(TM) because it means I have multiple, concurrent revenue streams. :-) Carpe weekend, Rich -- I dream of an America where a chicken can cross the road without having its motives questioned.