From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Partitioning by month causing an error?
Date: Fri, 20 Dec 2019 20:36:22 -0600
Message-ID: <d2c87f3f-f498-9fe9-92ae-0bc8c9c547bb@gmail.com> (raw)
In-Reply-To: <CAOC+FBXwJuW_rrjb=RzhoRcMfRYrx6GfyO9b53guQe1DVPZZPw@mail.gmail.com>
References: <CAOC+FBW=zSLyHWg2XDTp2eeEAmwzkzZLQPBqFx7_Cso=WMK3ew@mail.gmail.com>
<ff56245a-1be6-fbc0-e60c-295c5adec50b@gmail.com>
<CAOC+FBXwJuW_rrjb=RzhoRcMfRYrx6GfyO9b53guQe1DVPZZPw@mail.gmail.com>
What's the:
- Pg version number
- exact error message
- definition of mmd
- example statement that fails
On 12/20/19 8:32 PM, Wells Oliver wrote:
> mmd has a PARTITION BY RANGE on a date column.
>
> On Fri, Dec 20, 2019 at 6:24 PM Ron <ronljohnsonjr@gmail.com
> <mailto:ronljohnsonjr@gmail.com>> wrote:
>
> On 12/20/19 6:49 PM, Wells Oliver wrote:
> > I have a partition per each month, like this:
> >
> > CREATE TABLE mmd_yr2019_3 PARTITION OF mmd FOR VALUES FROM
> ('2019-03-01')
> > TO ('2019-03-31');
> > CREATE TABLE mmd_yr2019_4 PARTITION OF mmd FOR VALUES FROM
> ('2019-04-01')
> > TO ('2019-04-30');
> >
> > This breaks for dates at the end of the month. What's the better way to
> > write the bounds? 3/1 to 4/1 and then 4/1 to 5/1? Does that cause some
> > overlap issue?
>
> What is the mmd data type? I ask that because '2019-03-31' is really
> '2019-03-31 00:00:00.000', so there's nowhere for '2019-03-31
> 00:00:00.001'
> through '2019-03-31 23:59:59.999' to go. (And don't forget timezones.)
>
>
--
Angular momentum makes the world go 'round.
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: ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Partitioning by month causing an error?
In-Reply-To: <d2c87f3f-f498-9fe9-92ae-0bc8c9c547bb@gmail.com>
* 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