Column aliases in having or where for Postgres 8.3

From: Prafulla Tekawade <prafulla_t(at)users(dot)sourceforge(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Column aliases in having or where for Postgres 8.3
Date: 2011-06-01 22:08:05
Message-ID: BANLkTimcU33BmY0WqfAVOA0FbD=BV7XtcA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Anyone knows if I can use column aliases in having condition?
Something like this.

pgdb=# select sum(c_acctbal) as p from customer having p >
1000;

select sum(c_acctbal) as p from customer having p >
1000;

ERROR: column "p" does not
exist

LINE 1: select sum(c_acctbal) as p from customer having p >
1000;

^

--
Best Regards,
Prafulla V Tekawade

Browse pgsql-general by date

  From Date Subject
Next Message Robert James 2011-06-01 23:30:11 Table with active and historical data
Previous Message Paolo Saudin 2011-06-01 19:15:43 SELECT to_timestamp crash PostgreSQL 9.1beta1