From: Tomasz Myrta <jasiek@klaster.net>
To: Lista dyskusyjna pgsql-sql <pgsql-sql@postgresql.org>
Subject: column alias and group by/having/order
Date: Fri, 13 Feb 2004 14:34:54 +0100
Message-ID: <402CD27E.7050001@klaster.net> (raw)
Hi
I found some strange column alias behaviour:
select val1+val2 as val
from some_table
group by val;
result - OK
select val1+val2 as val
from some_table
order by val;
result - OK
select val1+val2 as val
from some_table
group by val having val1+val2>1;
result - OK
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?
Regards,
Tomasz Myrta
----------------------------------------------------------------------------------------------------------------
PostgreSQL 7.3.4 on i386-pc-linux-gnu, compiled by GCC i386-linux-gcc
(GCC) 3.3.2 20031005 (Debian prerelease)
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: jasiek@klaster.net
Subject: Re: column alias and group by/having/order
In-Reply-To: <402CD27E.7050001@klaster.net>
* 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