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

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Possible bug: SQL function parameter in window frame definition
Date: 2019-10-02 16:50:13
Message-ID: 87y2y314qm.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

>> I'm going to leave the assertion out for now and put in a comment
>> for future reference.

Tom> WFM. At this point it's clear it would be a separate piece of work
Tom> not something to slide into the bug-fix patch, anyway.

OK. So here's the final patch.

(For the benefit of anyone in -hackers not following the original thread
in -general, the problem here is that expressions in window framing
clauses were not being walked or mutated by query_tree_walker /
query_tree_mutator. This has been wrong ever since 9.0, but somehow
nobody seems to have noticed until now.)

--
Andrew (irc:RhodiumToad)

Attachment Content-Type Size
wc3.patch text/x-patch 8.3 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2019-10-02 16:56:29 Re: Possible bug: SQL function parameter in window frame definition
Previous Message Tom Lane 2019-10-02 16:31:15 Re: Possible bug: SQL function parameter in window frame definition

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2019-10-02 16:50:46 Re: dropdb --force
Previous Message Tom Lane 2019-10-02 16:31:15 Re: Possible bug: SQL function parameter in window frame definition