From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
Cc: | Hervé Piedvache <herve(at)elma(dot)fr>, Darko Prenosil <darko(dot)prenosil(at)finteh(dot)hr>, Postgresql General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Why lower's not accept an AS declaration ? |
Date: | 2003-08-19 00:44:58 |
Message-ID: | 14956.1061253898@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> writes:
> Okay, I think many of the random restrictions (in 2a, the grouping,
> distinct, set function spec) are to stop you from doing things like:
> select distinct a from table order by b;
> select a,min(b) from table group by a order by c;
> select count(*) from table order by a;
> All of which seem badly defined to me
Agreed, but restrictions on those grounds should be identical to the
restrictions on what you can write in a SELECT-list item. AFAICT the
restrictions actually cited here are quite different.
> The whole definition of simple table query seems to boil down to the fact
> that the query expression must be a query specification (which would
> appear to kill UNION/INTERSECT/EXCEPT, which makes sense since input
> column names aren't necessarily meaningful in that case).
Right, you could only use output column names for an ORDER BY on a
UNION/etc. We have that restriction already. But is that really all
they're saying here?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Jeffrey Melloy | 2003-08-19 01:52:55 | 'now' vs now() performance |
Previous Message | Stephan Szabo | 2003-08-19 00:21:33 | Re: 3 way outer join dilemma |