Received: from mail.pumpkinnet.com ([63.146.77.66]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1S1htx38397 for ; Tue, 27 Feb 2001 20:43:55 -0500 (EST) (envelope-from limin@pumpkinnet.com) Received: from pumpkinnet.com (IDENT:limin@limin-dev1.pumpkinnet.com [172.16.2.4]) by mail.pumpkinnet.com (8.9.3/8.8.7) with ESMTP id QAA01279 for ; Tue, 27 Feb 2001 16:01:05 -0800 Message-ID: <3A9C3AEE.BBF70529@pumpkinnet.com> Date: Tue, 27 Feb 2001 15:40:30 -0800 From: Limin Liu X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.16-3smp i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-general@postgresql.org Subject: Is this a bug? Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.postgresql.org id f1S1htx38398 X-Archive-Number: 200102/1397 X-Sequence-Number: 5358 Hi, Can anyone please tell me whether this is a bug or not? I used the following SQL to create my table and view with some data. ======================= create table tbl (no int, cnt int); create view tbl_view as select no, count(cnt) as count from tbl group by no having count(cnt) > 2; insert into tbl values(1, 1); insert into tbl values(1, 2); insert into tbl values(1, 3); insert into tbl values(1, 4); insert into tbl values(2, 1); insert into tbl values(2, 2); insert into tbl values(2, 3); ======================= Here is soem SQL I issued; first one looks fine to me, but the second one is weird. ======================= db=> select * from tbl_view; no | count ----+------- 1 | 4 2 | 3 (2 rows) db=> select * from tbl_view where count > 5; no | count ----+------- 1 | 4 2 | 3 (2 rows) db2=> ======================= Thanx LM.Liu