Re: BUG #17525: Range partition by date won't allow the use of a date that is the upper bound

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: allen(dot)sutton(at)valocityglobal(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17525: Range partition by date won't allow the use of a date that is the upper bound
Date: 2022-06-21 23:33:38
Message-ID: 7D0BE81B-40BA-4901-973E-70FFC4C01034@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> On Jun 21, 2022, at 16:11, PG Bug reporting form <noreply(at)postgresql(dot)org> wrote:
> e.g. CREATE TABLE avm.avm_history_201704 PARTITION OF avm.avm_history_part
> FOR VALUES FROM ('2017-04-01') TO ('2017-04-30');

The upper bound on a range partition is exclusive: The partition is defined as from 2017-04-01 up to, but not including 2017-04-30. If you want full-month partitions, you probably want the upper bound to be 2017-05-01 (in this example).

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2022-06-22 01:59:27 BUG #17526: PG_DUMP is not outputting "CREATE SCHEMA" statements when an extension is assigned to a schema
Previous Message Allen Sutton 2022-06-21 23:31:04 RE: BUG #17525: Range partition by date won't allow the use of a date that is the upper bound