Re: WINDOW RANGE patch versus leakproofness

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Oliver Ford <ojford(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Stephen Frost <sfrost(at)snowman(dot)net>
Subject: Re: WINDOW RANGE patch versus leakproofness
Date: 2018-01-31 21:51:14
Message-ID: CA+TgmoZGn+DVT14PgN_JTgGZQwLw9qH79L-TZgi9Z4jabOr+Kw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 31, 2018 at 5:52 AM, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:
> On 30 January 2018 at 16:42, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> So I'm thinking that (a) we do not need to check for leaky functions used
>> in window support, and (b) therefore there's no need to avoid leaky
>> behavior in in_range support functions. Objections?
>
> Yes, I concur. Since window functions can only appear in the SELECT
> target list and ORDER BY clauses, they should never appear in a qual
> that gets considered for push down, and thus contain_leaked_vars()
> should never see a window function.

What about a query that uses window functions within a subquery?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2018-01-31 22:00:28 pgsql: doc: clearify trigger behavior for inheritance
Previous Message Robert Haas 2018-01-31 21:47:03 Re: A typo in error message