pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedBackend closes caused by query on a view?!
2+ messages / 2 participants
[nested] [flat]
* Backend closes caused by query on a view?!
@ 1999-03-13 09:54 Viktor A. <a2891891@smail.Uni-Koeln.DE>
1999-03-13 16:06 ` Re: [SQL] Backend closes caused by query on a view?! Bruce Momjian <maillist@candle.pha.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: Viktor A. @ 1999-03-13 09:54 UTC (permalink / raw)
To: pgsql-sql
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
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [SQL] Backend closes caused by query on a view?!
1999-03-13 09:54 Backend closes caused by query on a view?! Viktor A. <a2891891@smail.Uni-Koeln.DE>
@ 1999-03-13 16:06 ` Bruce Momjian <maillist@candle.pha.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Momjian @ 1999-03-13 16:06 UTC (permalink / raw)
To: a2891891@smail.Uni-Koeln.DE; +Cc: pgsql-sql
[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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1999-03-13 16:06 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-03-13 09:54 Backend closes caused by query on a view?! Viktor A. <a2891891@smail.Uni-Koeln.DE>
1999-03-13 16:06 ` Bruce Momjian <maillist@candle.pha.pa.us>
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