pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ron <ronljohnsonjr@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Partitioning by month causing an error?
Date: Fri, 20 Dec 2019 23:10:26 -0500
Message-ID: <19102.1576901426@sss.pgh.pa.us> (raw)
In-Reply-To: <8ba56626-3b91-6ac8-34a9-ab2c9ca2b8c6@gmail.com>
References: <CAOC+FBW=zSLyHWg2XDTp2eeEAmwzkzZLQPBqFx7_Cso=WMK3ew@mail.gmail.com>
	<9226.1576897186@sss.pgh.pa.us>
	<8ba56626-3b91-6ac8-34a9-ab2c9ca2b8c6@gmail.com>

Ron <ronljohnsonjr@gmail.com> 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





view thread (13+ messages)  latest in thread

Message-ID: <19102.1576901426@sss.pgh.pa.us>
Permalink:  ../19102.1576901426@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19102.1576901426@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Partitioning by month causing an error?
  In-Reply-To: <19102.1576901426@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox