Re: TODO items for window functions

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: TODO items for window functions
Дата
Msg-id 20081231191055.GM12815@fetter.org
обсуждение исходный текст
Ответ на Re: TODO items for window functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Dec 31, 2008 at 11:04:41AM -0500, Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.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@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: SET TRANSACTION and SQL Standard
Следующее
От: David Fetter
Дата:
Сообщение: Re: version() output vs. 32/64 bits