Re: Column aliases for GROUP BY and HAVING

Поиск
Список
Период
Сортировка
От Rikard Bosnjakovic
Тема Re: Column aliases for GROUP BY and HAVING
Дата
Msg-id d9e88eaf0911251714j24716e15h28ea52c191f146f0@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Column aliases for GROUP BY and HAVING  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
On Wed, Nov 25, 2009 at 20:35, Tom Lane <tgl@sss.pgh.pa.us> wrote:

[...]
> HAVING is not included because (a) it wasn't historically, and (b)
> the use-case for a bare column alias in HAVING would be pretty small
> anyway.  Your example wouldn't work even if HAVING acted the same
> as GROUP BY/ORDER BY, since you didn't just write the alias but
> tried to compare it to something else.

Thank you for the explanation. I didn't fully understand the gory
details, but it's of use to know that I cannot refer to an alias.


--
- Rikard

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

Предыдущее
От: Kris Kewley
Дата:
Сообщение: Re: Column aliases for GROUP BY and HAVING
Следующее
От: Rikard Bosnjakovic
Дата:
Сообщение: Merging two GROUP BY-queries