Re: BUG: aliases does not work ((

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Cc: Eugen(dot)Konkov(at)aldec(dot)com
Subject: Re: BUG: aliases does not work ((
Date: 2008-05-07 11:52:37
Message-ID: 200805071352.37691.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Am Mittwoch, 7. Mai 2008 schrieb Eugen(dot)Konkov(at)aldec(dot)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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Marshall, Steve 2008-05-07 12:38:05 ORDER BY...LIMIT optimization does not work with inherited tables
Previous Message Eugen.Konkov 2008-05-07 11:09:33 BUG: aliases does not work ((