Re: Possible bug: SQL function parameter in window frame definition

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Alastair McKinley <a(dot)mckinley(at)analyticsengines(dot)com>
Cc: "pgsql-general\(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Possible bug: SQL function parameter in window frame definition
Date: 2019-09-28 15:59:55
Message-ID: 87tv8wmn1i.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

>>>>> "Alastair" == Alastair McKinley <a(dot)mckinley(at)analyticsengines(dot)com> writes:

Alastair> Hi all,

Alastair> I noticed this strange behaviour whilst trying to write a
Alastair> function for Postgres 11.5 (PostgreSQL 11.5 on
Alastair> x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623
Alastair> (Red Hat 4.8.5-36), 64-bit) and reduced it to this minimal
Alastair> example. Using a function parameter in the window frame
Alastair> definition seems to be the cause of the error.

[...]

Alastair> This appears to be a bug to me.

Yes, it's a bug, related to function inlining (the select f(3); is not
inlined and therefore works, but the select * from f(3); is being
inlined, but the original Param is somehow making it into the final plan
rather than being substituted with its value). Looking into why.

--
Andrew (irc:RhodiumToad)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message ROS Didier 2019-09-28 16:11:44 JSONB maximal length ?
Previous Message Alastair McKinley 2019-09-28 15:33:50 Possible bug: SQL function parameter in window frame definition

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2019-09-28 16:00:21 Re: Document recovery_target_action behavior?
Previous Message David Steele 2019-09-28 15:51:29 Re: Standby accepts recovery_target_timeline setting?