Re: [HACKERS] [6.5.3] 'attribute not found'

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: [HACKERS] [6.5.3] 'attribute not found'
Дата
Msg-id 3891B4F0.DDA4887B@alumni.caltech.edu
обсуждение исходный текст
Ответ на [6.5.3] 'attribute not found'  (The Hermit Hacker <scrappy@hub.org>)
Список pgsql-hackers
> >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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Re: ORDBMS
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: [HACKERS] Re: ORDBMS