Re: BUG: aliases does not work (( - Mailing list pgsql-bugs

From Peter Eisentraut
Subject Re: BUG: aliases does not work ((
Date
Msg-id 200805071352.37691.peter_e@gmx.net
Whole thread Raw
In response to BUG: aliases does not work ((  (<Eugen.Konkov@aldec.com>)
List pgsql-bugs
Am Mittwoch, 7. Mai 2008 schrieb Eugen.Konkov@aldec.com:
>  SELECT
> MIN(COALESCE(cmp_values(parent_td.value, parent_md.value,
> parent_cmp.value),0)) as chk_parent, FROM some_table
>
> having chk_parent > 0
>
> ERROR:  column "chk_parent" does not exist at character 2342

Aliases in the select list are not in scope in the having clause.  Either
write out the expression again or use a subquery.

pgsql-bugs by date:

Previous
From:
Date:
Subject: BUG: aliases does not work ((
Next
From: "Marshall, Steve"
Date:
Subject: ORDER BY...LIMIT optimization does not work with inherited tables