backend dies when trying a certain kind of a join

From: Ari Jolma <ajolma(at)ahti(dot)hut(dot)fi>
To: pgsql-sql(at)postgresql(dot)org
Subject: backend dies when trying a certain kind of a join
Date: 1999-01-04 07:10:19
Message-ID: 3.0.32.19990104091018.006d396c@ahti.hut.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I want to get this result:

i|c|d
-+-+-
1|a|c
2|b|
(2 rows)

so I did this

rosa=> create table a (i int, c text);
CREATE
rosa=> create table b (i int, d text);
CREATE
rosa=> insert into a (i,c) values (1,'a');
INSERT 4653972 1
rosa=> insert into a (i,c) values (2,'b');
INSERT 4653974 1
rosa=> insert into b (i,d) values (1,'c');
INSERT 4653975 1

and then tried to select but...

rosa=> select a.i,a.c,b.d from a,b where a.i=b.i or not a.i in (select i
from b);
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 can achieve the result I want in two steps using a temporary table but
the backend should not die in any case. Is my SELECT correct and "correct"
SQL?

I have a 6.4 PostgreSQL built on RedHat 5.1.

Ari

Browse pgsql-sql by date

  From Date Subject
Next Message Gordon Clarke 1999-01-04 11:30:50 Comments command
Previous Message Gordon Clarke 1999-01-03 06:02:35 Re: [SQL] Probs with int2 in functions