Re: Partitioning by month causing an error?

Ron <[email protected]> Fri, 20 Dec 2019 20:36:22 -0600
Newsgroups gmane.comp.db.postgresql.admin
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------6F15FCBDF2FABB5BC6430DC5
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit

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 <[email protected] 
> <mailto:[email protected]>> 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.

--------------6F15FCBDF2FABB5BC6430DC5
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    What's the:<br>
    <br>
    - Pg version number<br>
    - exact error message<br>
    - definition of mmd <br>
    - example statement that fails<br>
    <br>
    <div class="moz-cite-prefix">On 12/20/19 8:32 PM, Wells Oliver
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOC+FBXwJuW_rrjb=RzhoRcMfRYrx6GfyO9b53guQe1DVPZZPw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">mmd has a PARTITION BY RANGE on a date column.<br>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Fri, Dec 20, 2019 at 6:24
          PM Ron &lt;<a href="mailto:[email protected]"
            moz-do-not-send="true">[email protected]</a>&gt;
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On
          12/20/19 6:49 PM, Wells Oliver wrote:<br>
          &gt; I have a partition per each month, like this:<br>
          &gt;<br>
          &gt; CREATE TABLE mmd_yr2019_3 PARTITION OF mmd FOR VALUES
          FROM ('2019-03-01') <br>
          &gt; TO ('2019-03-31');<br>
          &gt; CREATE TABLE mmd_yr2019_4 PARTITION OF mmd FOR VALUES
          FROM ('2019-04-01') <br>
          &gt; TO ('2019-04-30');<br>
          &gt;<br>
          &gt; This breaks for dates at the end of the month. What's the
          better way to <br>
          &gt; write the bounds? 3/1 to 4/1 and then 4/1 to 5/1? Does
          that cause some <br>
          &gt; overlap issue?<br>
          <br>
          What is the mmd data type?  I ask that because '2019-03-31' is
          really <br>
          '2019-03-31 00:00:00.000', so there's nowhere for '2019-03-31
          00:00:00.001' <br>
          through '2019-03-31 23:59:59.999' to go.  (And don't forget
          timezones.)<br>
        </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
    <div class="moz-signature">-- <br>
      Angular momentum makes the world go 'round.</div>
  </body>
</html>

--------------6F15FCBDF2FABB5BC6430DC5--