David Fetter <da...@fetter.org> writes: > The "do nothing" solution is unacceptable because windowing functions > behave in a way that's essentially different, from the user's > perspective, from other functions including aggregates.
I don't like doing nothing either, but I disagree with your conclusion that window functions are as different from regular ones as aggregates are. Aggregates cause a sea-change in the behavior of the query around them; window functions do not. The call syntax of window functions is a bit odd (which is why \df needs to label them) but they still produce one output value where a regular function would produce one output value, and they don't have an impact on the semantics of the surrounding query. My own take on it is that actually I'd prefer one command for all of these. If I say "\df sum" it would be good if the output included the sum() aggregates; the reason being that I might be wondering if I can create a plain function named sum. If I have to check not only \df and \da but also \dw for conflicts, that's going to be a real PITA. Also, pity the poor newbie who is unclear on the distinctions between these different function-looking animals, and is just trying to find some documentation on rank(). If we were designing in a green field I think you could make a real strong case for a single \df command with an output column "type" having the alternatives regular, aggregate, window, and maybe trigger. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers