backend problem, 2nd turn.

From: Ulf Mehlig <umehlig(at)uni-bremen(dot)de>
To: pgsql-general(at)postgreSQL(dot)org
Subject: backend problem, 2nd turn.
Date: 1998-11-05 22:42:46
Message-ID: 199811052242.XAA14090@uni-bremen.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


This crashes v6.4, too.

--------------------------------------------------------------------
=> -- make table xxx, insert some values
create table xxx (
date1 date,
date2 date,
id smallint
);
CREATE

=> insert into xxx values ('01.01.1999', '15.01.1999', 1);
INSERT 69451 1
insert into xxx values ('01.01.1999', '15.01.1999', 1);
INSERT 69452 1
insert into xxx values ('01.01.1999', '15.01.1999', 1);
INSERT 69453 1
insert into xxx values ('01.01.1999', '15.01.1999', 1);
INSERT 69454 1

=> -- same for table yyy
create table yyy (
date_join date,
id_join smallint,
some_value float8
);
CREATE

=> insert into yyy values ('01.01.1999', 1, 1.21);
INSERT 69466 1
insert into yyy values ('01.01.1999', 1, 1.22);
INSERT 69467 1
insert into yyy values ('01.01.1999', 1, 1.23);
INSERT 69468 1
insert into yyy values ('01.01.1999', 1, 1.24);
INSERT 69469 1

=> -- make view
create view xxx1 as
select date1, date2, id,
count(id)*(date2-date1) as q
from xxx
group by date1, date2, id;
CREATE

=> -- that does work now:
select * from xxx1;

date1| date2|id| q
----------+----------+--+--
01-01-1999|01-15-1999| 1|56
(1 row)

=> -- this not (v6.4)
select date1, sum(some_value)/q
from xxx1, yyy
where date1 = date_join and
id = id_join
group by date1, q;

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.
--------------------------------------------------------------------
-- crash!
select date1, sum(some_value), q
from xxx1, yyy
where date1 = date_join and
id = id_join
group by date1;

-- crash!
select date1, q
from xxx1, yyy
where date1 = date_join and
id = id_join
group by date1,q;

-- doesn't crash
select date1, sum(some_value)
from xxx1, yyy
where date1 = date_join and
id = id_join
group by date1;

----------------------------------------------------------------------

Hmmm.

Ulf

--
======================================================================
%%%%% Ulf Mehlig <ulf(dot)mehlig(at)uni-bremen(dot)de>
%%%%!%%% Projekt "MADAM" <umehlig(at)uni-bremen(dot)de>
%%%% %!% %%%% ----------------------------------------------------
---| %%% MADAM: MAngrove | Center for Tropical Marine
||--%!% Dynamics | Biology
|| And | Fahrenheitstrasse 1
_ /||\_/\_ Management |
/ / \ \ ~~~~~~~~~~~~~~~~~ | 28359 Bremen/Germany
~~~~~~~~~~~~~~~~~~~~

Browse pgsql-general by date

  From Date Subject
Next Message Bob Dusek 1998-11-05 23:07:49 Re: [GENERAL] age('now',date::datetime)
Previous Message Chris Williams 1998-11-05 21:28:00 Re: [GENERAL] Upcoming 6.4 release issues - WinNT