From: | Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> |
---|---|
To: | The Hermit Hacker <scrappy(at)hub(dot)org> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org, Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
Subject: | Re: [HACKERS] Re: [GENERAL] Re: [PHP3] Re: PostgreSQL vs Mysql comparison |
Date: | 1999-10-05 13:59:27 |
Message-ID: | 37FA043E.E8ABA442@alumni.caltech.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Anyone want to comment on this one? Just tested with v6.5.0 and it still
> exists there...
> vhosts=> create table test ( a int, b char );
> CREATE
> vhosts=> insert into test values ( 1, 'a' );
> INSERT 149258 1
> vhosts=> select a from test group by a having a > 0;
> ERROR: SELECT/HAVING requires aggregates to be valid
Oh, don't get me started again on crashme :(
What is the purpose of the previous query? It seems to be equivalent
to
select distinct a where a > 0;
We do support the HAVING clause, but apparently disallow some
degenerate cases. If MySQL weren't just a toy db, perhaps they would
start putting real queries into their garbage crashme. There, I feel
better now ;)
postgres=> select b, avg(a) from test group by b having avg(a) > 0;
b|avg
-+---
a| 1
(1 row)
- Thomas
--
Thomas Lockhart lockhart(at)alumni(dot)caltech(dot)edu
South Pasadena, California
From | Date | Subject | |
---|---|---|---|
Next Message | Henry Molina | 1999-10-05 14:05:31 | Request inforamation |
Previous Message | Thomas Lockhart | 1999-10-05 13:22:01 | Re: [HACKERS] How to add a new build-in operator |