Received: from Mail.austin.rr.com (sm2.texas.rr.com [24.93.35.55]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA29899 for ; Fri, 26 May 2000 11:29:21 -0400 (EDT) (envelope-from eloehr@austin.rr.com) Received: from austin.rr.com ([24.93.36.232]) by Mail.austin.rr.com with Microsoft SMTPSVC(5.5.1877.357.35); Fri, 26 May 2000 10:15:01 -0500 Message-ID: <392E9926.6B40AE53@austin.rr.com> Date: Fri, 26 May 2000 10:32:54 -0500 From: Ed Loehr X-Mailer: Mozilla 4.7 [en] (X11; U; Linux 2.2.12-20smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Alexandr Listopad CC: pgsql-interfaces@postgresql.org Subject: Re: Where is a mistake? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200005/68 Alexandr Listopad wrote: > > CREATE VIEW v1 AS SELECT n.net AS net, > n.sh_desc AS net_name, > count(s.ip) AS total_q > sum(s.bytes)/1024 AS Kb > FROM zgia_nets n, > squid_logs s > WHERE network_sub(s.ip,n.net) > AND > date_eq(dt::date,'24-05-2000') > AND > s.peer_stat != 'NONE' > GROUP BY net,net_name > ORDER BY Kb; > > stats=> select t1.net,t1.net_name,t1.total_q,t1.total_q/sum(t2.total_q) from v1 t1, > v1 t2 group by 1,2,3; > > pqReadData() -- backend closed the channel unexpectedly. > This probably means the backend terminated abnormally > before or while processing the request. > We have lost the connection to the backend, so further processing is > impossible. Terminating. > > where is a mistake? or is it a bug? > > I have PGSQL v 6.5.3. Mistake #1: using 6.5.3 instead of 7.0 :) Mistake #2: aggregates are not supported in views :( Loaded question: What does your server log show when this happens? Regards, Ed Loehr