Re: Partitioning by month causing an error?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ron <ronljohnsonjr(at)gmail(dot)com>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Partitioning by month causing an error?
Date: 2019-12-21 04:10:26
Message-ID: 19102.1576901426@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Ron <ronljohnsonjr(at)gmail(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2019-12-21 04:15:51 Re: Partitioning by month causing an error?
Previous Message Wells Oliver 2019-12-21 04:03:47 Re: Partitioning by month causing an error?