Search Postgresql Archives

suggestion for diagnostics (errors)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Consider following SQL:
**
select femail, min(fid) AS main_id, count(fid) AS countids
from users
where count(fid) > 1
group by femail
**

Of course, postgreSQL produce error for such wrong statement:

SQL error:

ERROR:  aggregates not allowed in WHERE clause

I think it would be much better if DBMS will provide us some kind of suggestions, e.g.:

SQL error:

ERROR:  aggregates not allowed in WHERE clause. Consider using HAVING clause.




--
Best regards,
Nikolay

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux