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 04:20:08 |
Message-ID: | 19901.1061266808@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I said:
> After reading over the spec again I finally realized the significance of
> this bit:
> i) Let X be any <column reference> directly contained in K(i).
> ii) If X does not contain an explicit <table or query name> or
> <correlation name>, then K(i) shall be a <column name> that
> shall be equivalent to the name of exactly one column of
> ST.
Wait a second ... this is a classic case of reading what you expected
rather than what's there. I thought that (ii) said "If X does not ...
then X shall be ..." but that's not what it says --- the "then" says
that the whole sort-key K(i) must be an output-column name.
In other words, SQL99 does not allow expressions over output-column
names. An output-column reference can only appear as a simple name
(same as SQL92, and same as what we allow). SQL99 allows expressions
over input-column names ... but only if the expressions use
fully-qualified input-column names.
This last is such a stupid restriction that I can't believe I'm reading
it right; is it just too late at night for me?
If I am reading it right, then we already support every case that is
legal per SQL99, and more besides.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Dustin Sallings | 2003-08-19 04:23:50 | Re: Example Database |
Previous Message | Dustin Sallings | 2003-08-19 04:13:29 | Re: Simulating sequences |