Skip site navigation (1) Skip section navigation (2)

Re: TODO items for window functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, David Fetter <david(at)fetter(dot)org>, Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: TODO items for window functions
Date: 2008-12-31 16:04:41
Message-ID: (view raw or whole thread)
Lists: pgsql-hackers
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Heikki Linnakangas escribi:
>> Tom Lane wrote:
>>> pg_catalog | nth_value | anyelement       | anyelement, integer OVER window
>> That looks like "OVER window" is associated with the "integer", like  
>> DEFAULT. I don't have any better suggestions, though.

>   pg_catalog | nth_value | anyelement       | (anyelement, integer) OVER window

Yeah, I had considered that too, and it has a distinct advantage for
parameterless functions like rank():

   Schema   | Name | Result data type | Argument data types 
 pg_catalog | rank | bigint           | OVER window
 pg_catalog | rank | bigint           | () OVER window

The latter is definitely clearer about what you're supposed to do.

However, it seems kind of inconsistent to do this for window functions
unless we also make \df start putting parens around the argument lists
for regular functions.  Comments?

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2008-12-31 16:22:50
Subject: Re: version() output vs. 32/64 bits
Previous:From: Tom LaneDate: 2008-12-31 16:01:25
Subject: Re: pg_pltemplate entries for external PLs

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group