Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.8.8/8.8.8) with ESMTP id XAA12911 for ; Thu, 17 Sep 1998 23:00:14 -0400 (EDT) (envelope-from maillist@candle.pha.pa.us) Received: (from maillist@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id WAA19604; Thu, 17 Sep 1998 22:58:51 -0400 (EDT) From: Bruce Momjian Message-Id: <199809180258.WAA19604@candle.pha.pa.us> Subject: Re: [SQL] postmaster dies on complicated views In-Reply-To: from David Rugge at "Sep 17, 1998 10:14:44 pm" To: davidrugge@mindspring.com (David Rugge) Date: Thu, 17 Sep 1998 22:58:51 -0400 (EDT) Cc: pgsql-sql@hub.org X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > I've had a strange problem with viewing through anything but a basic view. > The view in question is defined as follows: > > create view currentinfo > as > select pub_id, type, sum(price*ytd_sales), avg(price), avg(ytd_sales) > from titles > group by pub_id, type; > > this is what happens when I do a select * from currentinfo: > > PQexec() -- Request was sent to backend, but backend closed the channel > before responding. > This probably means the backend terminated abnormally before or while > processing the request. > > > What does this message mean? Once I get this error, I have to quit and > relaunch psql before any other queries are successful. I think the problem > may be with the "sum(price*ytd_sales)" selection, since I tried another > query with multiplication in the select clause and it died too. Can't use aggregates in views. Sorry. On the TODO list. -- Bruce Momjian | 830 Blythe Avenue maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 http://www.op.net/~candle | (610) 353-9879(w) + If your life is a hard drive, | (610) 853-3000(h) + Christ can be your backup. |