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

Re: TODO items for window functions

From: David Fetter <david(at)fetter(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>,Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>,Robert Haas <robertmhaas(at)gmail(dot)com>,Andrew Dunstan <andrew(at)dunslane(dot)net>,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 19:10:55
Message-ID: 20081231191055.GM12815@fetter.org (view raw or flat)
Thread:
Lists: pgsql-hackers
On Wed, Dec 31, 2008 at 11:04:41AM -0500, Tom Lane wrote:
> 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.

+1 on the latter.

> 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?

Would parens around all the argument lists really be so bad?  I'm
thinking not.

Cheers,
David.
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

pgsql-hackers by date

Next:From: David FetterDate: 2008-12-31 19:17:01
Subject: Re: version() output vs. 32/64 bits
Previous:From: Simon RiggsDate: 2008-12-31 18:41:00
Subject: Re: Latest version of Hot Standby patch

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