Re: How to use result column names in having cause

Поиск
Список
Период
Сортировка
От Andrus
Тема Re: How to use result column names in having cause
Дата
Msg-id e0j9fs$1stb$1@news.hub.org
обсуждение исходный текст
Ответ на How to use result column names in having cause  ("Andrus" <eetasoft@online.ee>)
Ответы Re: How to use result column names in having cause  ("chris smith" <dmagick@gmail.com>)
Re: How to use result column names in having cause  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-general
>> In real application I have long expression instead of 123 and do'nt want
>>  repeat this expression in HAVING clause.
>
> You have to repeat the expression. "AS" changes the output name, it
> can't be used either in the where clause or any other limiting factor
> like 'having':

Doc about HAVING condition says:

Each column referenced in condition must unambiguously reference a grouping
colum

HAVING x> AVG(bar) unambiguously references to a grouping column x

Is this bug ? It is very tedious to repeat same column expression in a
multiple times: one time in column expression, and n times in having clause.

Are there plans to fix this?

Andrus.



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

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: how to use pg_dump in windows xp
Следующее
От: "Andrus"
Дата:
Сообщение: Re: How to use result column names in having cause