Re: Now/current_date and proleakproof

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: Now/current_date and proleakproof
Дата
Msg-id CAHz80e7zJLanLvj_AaSK5U4S81JkuAZX_MPtpiLcK+q95pj10A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Now/current_date and proleakproof  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Now/current_date and proleakproof  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers


On Sat, 17 Nov 2018 at 14:32, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Rod Taylor <rod.taylor@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
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #15160: planner overestimates number of rows in join when there are more than 200 rows coming from CTE
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Now/current_date and proleakproof