suggestion for diagnostics (errors)

From: Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>
To: Postgresql-General <pgsql-general(at)postgresql(dot)org>
Subject: suggestion for diagnostics (errors)
Date: 2005-07-06 13:14:08
Message-ID: e431ff4c05070606142e46faf6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Browse pgsql-general by date

  From Date Subject
Next Message Patrick.FICHE 2005-07-06 13:20:24 Re: template1 problems
Previous Message D A GERM 2005-07-06 12:49:40 Re: double entries into database when using IE