aboutsummaryrefslogtreecommitdiff
path: root/test/select3.test
diff options
context:
space:
mode:
authordrh <>2022-06-21 13:41:24 +0000
committerdrh <>2022-06-21 13:41:24 +0000
commitb9294de1e6e4ff73b3f1d045d0325d5a54fb90f8 (patch)
treed00c16e00a212e1c49792a58d92872d01f131da3 /test/select3.test
parent4af6462fb811ebb1abb572a549249d0663da6c1a (diff)
downloadsqlite-b9294de1e6e4ff73b3f1d045d0325d5a54fb90f8.tar.gz
sqlite-b9294de1e6e4ff73b3f1d045d0325d5a54fb90f8.zip
Allow a HAVING clause on any aggregate query, even if there is no GROUP BY
clause. This brings SQLite into closer agreement with PostgreSQL and fixes the concern raised by [forum:/forumpost/1a7fea4651|forum post 1a7fea4651]. FossilOrigin-Name: 9322a7c21f1c22ba00e9b889223e89bc1591db6e561ce05091e905e98c1bf2b3
Diffstat (limited to 'test/select3.test')
-rw-r--r--test/select3.test7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/select3.test b/test/select3.test
index fec8ba4a5..690514b49 100644
--- a/test/select3.test
+++ b/test/select3.test
@@ -119,10 +119,9 @@ do_test select3-2.14 {
# Cannot have a HAVING without a GROUP BY
#
-do_test select3-3.1 {
- set v [catch {execsql {SELECT log, count(*) FROM t1 HAVING log>=4}} msg]
- lappend v $msg
-} {1 {a GROUP BY clause is required before HAVING}}
+do_execsql_test select3-3.1 {
+ SELECT log, count(*) FROM t1 HAVING log>=4
+} {}
# Toss in some HAVING clauses
#