From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | Kevin Brown <kevin(at)sysexperts(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: We are not following the spec for HAVING without GROUP |
Date: | 2005-03-10 04:44:55 |
Message-ID: | 11032.1110429895@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
>>> Comments? Can anyone confirm whether DB2 or other databases allow
>>> ungrouped column references with HAVING?
> MySQL allows it:
A slightly tighter experiment shows that they treat HAVING like WHERE
in this case:
mysql> create table tab(col int);
Query OK, 0 rows affected (0.00 sec)
mysql> insert into tab values(1);
Query OK, 1 row affected (0.00 sec)
mysql> insert into tab values(2);
Query OK, 1 row affected (0.01 sec)
mysql> select col from tab having col>1;
+------+
| col |
+------+
| 2 |
+------+
1 row in set (0.00 sec)
I think it's fairly likely that they copied our misinterpretation ...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-03-10 05:06:24 | Re: We are not following the spec for HAVING without GROUP BY |
Previous Message | Christopher Kings-Lynne | 2005-03-10 04:00:26 | Re: We are not following the spec for HAVING without GROUP |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-03-10 05:06:24 | Re: We are not following the spec for HAVING without GROUP BY |
Previous Message | Oleg Bartunov | 2005-03-10 04:43:18 | Re: pgpool question |