pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ari Jolma <ajolma@ahti.hut.fi>
To: pgsql-sql@postgresql.org
Subject: backend dies when trying a certain kind of a join
Date: Mon, 04 Jan 1999 09:10:19 +0200
Message-ID: <3.0.32.19990104091018.006d396c@ahti.hut.fi> (raw)

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




Message-ID: <3.0.32.19990104091018.006d396c@ahti.hut.fi>
Permalink:  ../3.0.32.19990104091018.006d396c@ahti.hut.fi/
Also on:    postgresql.org/message-id/3.0.32.19990104091018.006d396c@ahti.hut.fi

 · 

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: ajolma@ahti.hut.fi
  Subject: Re: backend dies when trying a certain kind of a join
  In-Reply-To: <3.0.32.19990104091018.006d396c@ahti.hut.fi>
  References: <3.0.32.19990104091018.006d396c@ahti.hut.fi>

* 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