Re: column alias and group by/having/order - Mailing list pgsql-sql

From Rod Taylor
Subject Re: column alias and group by/having/order
Date
Msg-id 1076681344.10896.19.camel@jester
Whole thread Raw
In response to column alias and group by/having/order  (Tomasz Myrta <jasiek@klaster.net>)
List pgsql-sql
> select val1+val2 as val
> from some_table
> group by val having val>1;
> ERROR:  Attribute "val" not found
> 
> Is it a bug or a feature?

It's a mis-feature that group by accepts aliases of the select list.

Having is proper.




pgsql-sql by date:

Previous
From: Tomasz Myrta
Date:
Subject: column alias and group by/having/order
Next
From: Tom Lane
Date:
Subject: Re: arrays and polygons