Cursor on an INTERSECT query assertion fails - Mailing list pgsql-bugs

From Heikki Linnakangas
Subject Cursor on an INTERSECT query assertion fails
Date
Msg-id 471CAF7E.6060206@enterprisedb.com
Whole thread Raw
Responses Re: Cursor on an INTERSECT query assertion fails
List pgsql-bugs
On CVS HEAD:

postgres=# SELECT a INTO foo1 from generate_series(1,100) a;
SELECT
postgres=# SELECT a INTO foo2 from generate_series(51,150) a;
SELECT
postgres=# DECLARE  setopcur SCROLL CURSOR FOR SELECT * FROM foo1
intersect SELECT * FROM foo2;
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

From the log:

TRAP: FailedAssertion("!(parse->utilityStmt == ((void *)0))", File:
"prepunion.c", Line: 114)

(the above is actually supposed to throw an "not in a transaction block"
error, but you get the same result with a BEGIN in there.)

ISTM the Assertion is just bogus, and can be removed.

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

pgsql-bugs by date:

Previous
From: "Heikki Linnakangas"
Date:
Subject: Re: BUG #3682: Incomplete database restore
Next
From: Tom Lane
Date:
Subject: Re: BUG #3682: Incomplete database restore