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 1iiW65-0002To-Mr for pgsql-admin@arkaria.postgresql.org; Sat, 21 Dec 2019 04:10:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iiW64-0002kq-Gq for pgsql-admin@arkaria.postgresql.org; Sat, 21 Dec 2019 04:10:32 +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 1iiW64-0002kj-71 for pgsql-admin@lists.postgresql.org; Sat, 21 Dec 2019 04:10:32 +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 1iiW61-0007te-GT for pgsql-admin@lists.postgresql.org; Sat, 21 Dec 2019 04:10:31 +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 xBL4AQOS019103; Fri, 20 Dec 2019 23:10:26 -0500 From: Tom Lane To: Ron cc: pgsql-admin@lists.postgresql.org Subject: Re: Partitioning by month causing an error? In-reply-to: <8ba56626-3b91-6ac8-34a9-ab2c9ca2b8c6@gmail.com> References: <9226.1576897186@sss.pgh.pa.us> <8ba56626-3b91-6ac8-34a9-ab2c9ca2b8c6@gmail.com> Comments: In-reply-to Ron message dated "Fri, 20 Dec 2019 21:42:36 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <19101.1576901426.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Fri, 20 Dec 2019 23:10:26 -0500 Message-ID: <19102.1576901426@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Ron writes: > On 12/20/19 8:59 PM, Tom Lane wrote: >> The rule is that a range partition from A to B covers values A <= X < B. > If I were to ask to count *from* 1 *to* 100, you'd count from 1 to 100, > *not* 1 to 99.  Who decided to arbitrarily break a grammatical rule we > (native English speakers, and I bet everyone else, too) all learn as > children, causing all sorts of needless confusion and breakage? This rule breaks fewer things than a rule of A <= X <= B would. In particular, for more-or-less-continuous values like float8s or timestamps, you really really don't want to have to write down the-last-possible-value-before-the-start-of-the-next-partition. regards, tom lane