pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Lewis <mlewis@entrata.com>
To: Luca Ferrari <fluca1978@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: literal vs dynamic partition constraint in plan execution
Date: Tue, 3 Sep 2019 13:00:39 -0600
Message-ID: <CAHOFxGoG-urMdPxHD2OTUvAWBTsMsdO5f7ywyefLC5GNxgsofQ@mail.gmail.com> (raw)
In-Reply-To: <CAKoxK+62SXRreE-Cq3G5jiTeyWZbmyimbQeMogKq32=QNfHFGA@mail.gmail.com>
References: <CAKoxK+4qyKtzdznxzG+AyOe-Yf=FFbUHRLcptVGK6hrRQD9wPA@mail.gmail.com>
	<CAKoxK+6GhFX9shFva-NGiqvWxp94r0sXHdX=Tb2qNNET6rr0Yg@mail.gmail.com>
	<CAKoxK+62SXRreE-Cq3G5jiTeyWZbmyimbQeMogKq32=QNfHFGA@mail.gmail.com>

I think I would expect this behavior with how you have defined the
constraints as the function results rather than just being strict
comparisons to the timestamp field.

Instead of this-
Check constraints:
>     "y2018_mis_ora_check" CHECK (date_part('year'::text, mis_ora) =
> 2018::double precision)

I would expect this-
Check constraints:
>     "y2018_mis_ora_check" CHECK mis_ora) >= make_timestamp(2018, 1,
> 1, 0, 0, 0::double precision) AND < make_timestamp(2019, 1,
> 1, 0, 0, 0::double precision)

view thread (4+ messages)

Message-ID: <CAHOFxGoG-urMdPxHD2OTUvAWBTsMsdO5f7ywyefLC5GNxgsofQ@mail.gmail.com>
Permalink:  ../CAHOFxGoG-urMdPxHD2OTUvAWBTsMsdO5f7ywyefLC5GNxgsofQ@mail.gmail.com/
Also on:    postgresql.org/message-id/CAHOFxGoG-urMdPxHD2OTUvAWBTsMsdO5f7ywyefLC5GNxgsofQ@mail.gmail.com

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: mlewis@entrata.com, fluca1978@gmail.com
  Subject: Re: literal vs dynamic partition constraint in plan execution
  In-Reply-To: <CAHOFxGoG-urMdPxHD2OTUvAWBTsMsdO5f7ywyefLC5GNxgsofQ@mail.gmail.com>
  References: <CAKoxK+4qyKtzdznxzG+AyOe-Yf=FFbUHRLcptVGK6hrRQD9wPA@mail.gmail.com> <CAKoxK+6GhFX9shFva-NGiqvWxp94r0sXHdX=Tb2qNNET6rr0Yg@mail.gmail.com> <CAKoxK+62SXRreE-Cq3G5jiTeyWZbmyimbQeMogKq32=QNfHFGA@mail.gmail.com> <CAHOFxGoG-urMdPxHD2OTUvAWBTsMsdO5f7ywyefLC5GNxgsofQ@mail.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