Re: WINDOW RANGE patch versus leakproofness - Mailing list pgsql-hackers

From Robert Haas
Subject Re: WINDOW RANGE patch versus leakproofness
Date
Msg-id CA+TgmoZGn+DVT14PgN_JTgGZQwLw9qH79L-TZgi9Z4jabOr+Kw@mail.gmail.com
Whole thread Raw
In response to Re: WINDOW RANGE patch versus leakproofness  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Responses Re: WINDOW RANGE patch versus leakproofness  (Dean Rasheed <dean.a.rasheed@gmail.com>)
List pgsql-hackers
On Wed, Jan 31, 2018 at 5:52 AM, Dean Rasheed <dean.a.rasheed@gmail.com> wrote:
> On 30 January 2018 at 16:42, Tom Lane <tgl@sss.pgh.pa.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


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: A typo in error message
Next
From: Robert Haas
Date:
Subject: Re: pgsql: doc: clearify trigger behavior for inheritance