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 1gfTEe-0007SO-Ly for pgsql-general@arkaria.postgresql.org; Fri, 04 Jan 2019 17:26:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gfTEd-00052L-CW for pgsql-general@arkaria.postgresql.org; Fri, 04 Jan 2019 17:26:15 +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 1gfTEd-00052E-4O for pgsql-general@lists.postgresql.org; Fri, 04 Jan 2019 17:26:15 +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 1gfTEb-0002Uu-31 for pgsql-general@lists.postgresql.org; Fri, 04 Jan 2019 17:26:14 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 7A3F69934F for ; Fri, 4 Jan 2019 09:26:10 -0800 (PST) Date: Fri, 4 Jan 2019 09:26:10 -0800 (PST) From: Rich Shepard To: pgsql-general@lists.postgresql.org Subject: Re: Comparing dates in DDL In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, 4 Jan 2019, Rob Sargent wrote: > Is the end_date always knowable at record insert? Rob, Not always. Sometimes projects have known end dates, other times the end is interminate until it happens. > CHECK(end_date is null or start_date <= end_date) So a default of NULL should be applied, or just allowed to happen? Thanks, Rich