From: | Rod Taylor <rod(dot)taylor(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Now/current_date and proleakproof |
Date: | 2018-11-17 20:56:01 |
Message-ID: | CAHz80e7zJLanLvj_AaSK5U4S81JkuAZX_MPtpiLcK+q95pj10A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, 17 Nov 2018 at 14:32, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Rod Taylor <rod(dot)taylor(at)gmail(dot)com> writes:
> > Should now/current_date be marked leakproof?
>
> Since it has no argument, that should be moot.
>
Gah, you're right.
It seems to be because the below clause is timestamp without time zone:
WHERE current_date - interval '1 day'
This works as expected on 9.6 and head:
WHERE current_date::timestamp with time zone - interval '1 day' as ex2;
Of course, the first version without the cast does push through a barrier.
So it's the timestamp_%_timestamptz operator functions that are missing the
flag?
Attached is an example. It seems all 3 queries should be able to use the
same type of plan.
--
Rod Taylor
Attachment | Content-Type | Size |
---|---|---|
clause_pushdown.sql | application/sql | 7.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-11-17 21:01:49 | Re: Now/current_date and proleakproof |
Previous Message | Tom Lane | 2018-11-17 20:22:20 | Re: BUG #15160: planner overestimates number of rows in join when there are more than 200 rows coming from CTE |