On Sat, 17 Nov 2018 at 14:32, Tom Lane <t...@sss.pgh.pa.us> wrote: > Rod Taylor <rod.tay...@gmail.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
clause_pushdown.sql
Description: application/sql