Re: literal vs dynamic partition constraint in plan execution

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Luca Ferrari <fluca1978(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: literal vs dynamic partition constraint in plan execution
Date: 2019-09-03 19:00:39
Message-ID: CAHOFxGoG-urMdPxHD2OTUvAWBTsMsdO5f7ywyefLC5GNxgsofQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2019-09-03 19:47:35 Re: Upgrade 96 -> 11
Previous Message Michael Lewis 2019-09-03 18:39:34 Re: Bad Estimate for multi tenant database queries