Re: Why lower's not accept an AS declaration ? - Mailing list pgsql-general

From Tom Lane
Subject Re: Why lower's not accept an AS declaration ?
Date
Msg-id 899.1061239215@sss.pgh.pa.us
Whole thread Raw
In response to Why lower's not accept an AS declaration ?  (Hervé Piedvache <herve@elma.fr>)
Responses Re: Why lower's not accept an AS declaration ?  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-general
Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> Actually, rereading SQL99, I wonder if it would expect this to work.
> Using 14.1's wording on order by clauses, syntax rule 18, h

Hmm ... that section is not exactly crystal-clear, is it?  I had been
thinking of the part about deliberate incompatibilities with SQL92,
but rereading that, I see it only says they've eliminated the ability
to reference output columns by *number*, not by name.

Yet if they merely want to say "we allow expressions in the output
column names", why wouldn't they say that?  This section is about ten
times longer than it would need to be to express that concept.  I get
the impression that they're trying to compromise between allowing output
column names and input column names, but I sure don't follow exactly how
the compromise is supposed to work.  And there are a ton of apparently-
unnecessary restrictions (no grouping, no subqueries in the sort keys)
that make me wonder what's going on.

Can anyone translate this part of the spec into plain English?

            regards, tom lane

pgsql-general by date:

Previous
From: "Vilson farias"
Date:
Subject: 7.3.4 RPM
Next
From: Adam Kavan
Date:
Subject: Re: Default Value in Table Setup Help