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>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: TODO items for window functions
Date: 2008-12-30 18:52:30
Message-ID: 20081230185230.GA12815@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 30, 2008 at 11:59:22AM -0500, Tom Lane wrote:
> I wrote:
> > You could certainly argue the classification either way, but I
> > think that we should make a hard decision now: either window
> > functions are treated as a distinct object type (implying their
> > own set of command names and nuisance errors if you use the wrong
> > one), or they are not a distinct object type (implying that WINDOW
> > is an attribute for CREATE FUNCTION and not part of the command
> > name). If we are wishy-washy about it and treat WINDOW as just a
> > noise word in some contexts then we will have user confusion. The
> > precedent that is bothering me here is all the user confusion that
> > has ensued over whether you can use ALTER TABLE to operate on
> > sequences and views.
>
> Apparently that analogy didn't impress anyone but me. AFAICT the
> majority opinion is that we should use the syntax
>
> create [or replace] [window] function ...
>
> but just ignore the distinction between regular functions and window
> functions for all other function-related SQL commands. Barring further
> discussion, I'll make that happen in the next day or two.

Presumably psql should know about this change. Should \df now include
windowing functions along with a boolean column that indicates whether
a function is a windowing function? Should there be \dw[+] instead?

In either case, should the S option indicating "include system
functions only when S is present" (e.g. \dwS) apply?

I'm thinking yes on that last one.

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2008-12-30 18:55:38 Re: TODO items for window functions
Previous Message Kevin Grittner 2008-12-30 18:13:36 Re: Documenting serializable vs snapshot isolation levels