Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.9.2/8.9.1) with ESMTP id LAA43229 for ; Sat, 13 Mar 1999 11:06:26 -0500 (EST) (envelope-from maillist@candle.pha.pa.us) Received: (from maillist@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id LAA10029; Sat, 13 Mar 1999 11:06:04 -0500 (EST) From: Bruce Momjian Message-Id: <199903131606.LAA10029@candle.pha.pa.us> Subject: Re: [SQL] Backend closes caused by query on a view?! In-Reply-To: <002f01be6d37$815ae840$0200a8c0@Tischrechner.rrz.uni-koeln.de> from "Viktor A." at "Mar 13, 1999 10:54:36 am" To: a2891891@smail.Uni-Koeln.DE (Viktor A.) Date: Sat, 13 Mar 1999 11:06:04 -0500 (EST) Cc: pgsql-sql@postgreSQL.org X-Mailer: ELM [version 2.4ME+ PL47 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit [Charset iso-8859-1 unsupported, filtering to ASCII...] > Hi! > > Can anybody tell me, what I'm doing so wrong, > that the backend needs to close the connection? > I've got a view that gives me a total of costs for > each day, which looks like this: > > create view view_test AS > select date(datum_zeit),sum(betrag) AS "summe" > from anrufe_isdn where richtung='True' > AND date(datum_zeit)>date(timemi(now() ::datetime, '30 day' ::timespan)) > group by date(datum_zeit); We have some problems with aggregates in views, I think. The TODO list says: * views containing aggregates sometimes fail(Jan) -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026