Re: Partitioning by month causing an error?

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

Wells Oliver <wells(dot)oliver(at)gmail(dot)com> 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ron 2019-12-21 04:31:35 Re: Partitioning by month causing an error?
Previous Message Tom Lane 2019-12-21 04:10:26 Re: Partitioning by month causing an error?