Re: BUG #4982: Wrong result of cartesian product when function result included in where clause - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #4982: Wrong result of cartesian product when function result included in where clause
Date
Msg-id 9570.1250112674@sss.pgh.pa.us
Whole thread Raw
In response to BUG #4982: Wrong result of cartesian product when function result included in where clause  ("hwa" <helmut.r.wagner@googlemail.com>)
List pgsql-bugs
"hwa" <helmut.r.wagner@googlemail.com> writes:
> -- Cartesian product of all rows from table konten without konto_id = 4. I
> expect 9 rows from this query.
> SELECT abschlussart, abschlussdatum, konto_id, kontoname FROM public.konten,
> public.abschlusstermine
> WHERE konto_id in (select * from public.get_konten());

I get 9 rows from this in CVS tip.  I think you're getting bit by one of
the semijoin optimization bugs that we've already found in 8.4.
(IWO it's the IN that's the problem, not specifically either the
cartesian join or the function...)

            regards, tom lane

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #4983: PostgreSQL build fails
Next
From: "Carlos B Netto"
Date:
Subject: BUG #4984: One click Installation error.