pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rod Taylor <pg@rbt.ca>
To: Tomasz Myrta <jasiek@klaster.net>
Cc: Lista dyskusyjna pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: column alias and group by/having/order
Date: Fri, 13 Feb 2004 09:09:05 -0500
Message-ID: <1076681344.10896.19.camel@jester> (raw)
In-Reply-To: <402CD27E.7050001@klaster.net>
References: <402CD27E.7050001@klaster.net>

> 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.





view thread (3+ messages)  latest in thread

Message-ID: <1076681344.10896.19.camel@jester>
Permalink:  ../1076681344.10896.19.camel@jester/
Also on:    postgresql.org/message-id/1076681344.10896.19.camel@jester

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pg@rbt.ca, jasiek@klaster.net
  Subject: Re: column alias and group by/having/order
  In-Reply-To: <1076681344.10896.19.camel@jester>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox