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 1iiWBK-0002gQ-Pz for pgsql-admin@arkaria.postgresql.org; Sat, 21 Dec 2019 04:15:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iiWBI-0000ku-4i for pgsql-admin@arkaria.postgresql.org; Sat, 21 Dec 2019 04:15:56 +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 1iiWBH-0000km-RK for pgsql-admin@lists.postgresql.org; Sat, 21 Dec 2019 04:15:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iiWBF-0007wm-M3 for pgsql-admin@postgresql.org; Sat, 21 Dec 2019 04:15:55 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id xBL4FphT019970; Fri, 20 Dec 2019 23:15:51 -0500 From: Tom Lane To: Wells Oliver cc: pgsql-admin Subject: Re: Partitioning by month causing an error? In-reply-to: References: <9226.1576897186@sss.pgh.pa.us> Comments: In-reply-to Wells Oliver message dated "Fri, 20 Dec 2019 20:03:47 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19968.1576901751.1@sss.pgh.pa.us> Date: Fri, 20 Dec 2019 23:15:51 -0500 Message-ID: <19969.1576901751@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Wells Oliver writes: > This is really interesting to me: why? Running select '2019-04-30'::date > between '2019-04-01'::date and '2019-04-30'::date; yields true, and > generally the lower and upper bounds are inclusive in any kind of between > check for languages I am familiar with. It's possible to do it like that for discrete types like dates. It's not possible for continuous types. Exercise: try to write a partitioning rule for a "numeric" column that classifies every value into one and only one partition, if the partitioning behavior is like A <= X <= B. (No fair restricting the precision of the numeric.) regards, tom lane