pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Viktor A. <a2891891@smail.Uni-Koeln.DE>
To: Postgres-SQL <pgsql-sql@postgresql.org>
Subject: Backend closes caused by query on a view?!
Date: Sat, 13 Mar 1999 10:54:36 +0100
Message-ID: <002f01be6d37$815ae840$0200a8c0@Tischrechner.rrz.uni-koeln.de> (raw)

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);

It works very well, if I do the query:

  select * from view_anrufe;
or
  select date,summe from view_anrufe;

But If I do:

  select summe from view_anrufe;
or
  select avg(summe) from view_anrufe;

I get:

  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.

I'm running Postgresql Version 6.4 on a Linux-box with Kernel V.2.0.33....

Thanks for any help in advanced!!

Viktor





view thread (2+ messages)  latest in thread

Message-ID: <002f01be6d37$815ae840$0200a8c0@Tischrechner.rrz.uni-koeln.de>
Permalink:  ../002f01be6d37$815ae840$0200a8c0@Tischrechner.rrz.uni-koeln.de/
Also on:    postgresql.org/message-id/002f01be6d37$815ae840$0200a8c0@Tischrechner.rrz.uni-koeln.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: a2891891@smail.Uni-Koeln.DE
  Subject: Re: Backend closes caused by query on a view?!
  In-Reply-To: <002f01be6d37$815ae840$0200a8c0@Tischrechner.rrz.uni-koeln.de>
  References: <002f01be6d37$815ae840$0200a8c0@Tischrechner.rrz.uni-koeln.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox