> >No, it shouldn't. Labeling SELECT output columns with AS doesn't
> >affect the namespace visible in the WHERE clause (since WHERE is
> >"upstream" of the SELECT outputs).
> > If we had sub-selects in FROM,
> >I believe that AS would determine the column names seen outside
> >the sub-select ("downstream").
> >Also, you can use the AS names in ORDER BY, which is also "downstream"
> >of forming the results. (I think we currently accept them in GROUP BY
> >as well, but I suspect that that is not in compliance with the
> >standard...)
> After the discussion a few weeks ago I tried to decide by reading Date
> (which I bought in part of the discussion, figuring it was about time)
> and decided I couldn't tell for sure...
Oh puhleez! Date... about time... Or maybe finding that funny means
I've been working on this stuff *way* too long :)
Anyway, afaik we will have the capability in 7.0 to specify column
aliases in AS clauses like this:
postgres=# select a+b from t1 as tx (a), t1 as ty (b);?column?
---------- 2
(1 row)
This is actually running on my computer now; I'm starting to rework
the "outer join syntax" and will then do a commit.
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California