Re: BUG #4982: Wrong result of cartesian product when function result included in where clause

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "hwa" <helmut(dot)r(dot)wagner(at)googlemail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4982: Wrong result of cartesian product when function result included in where clause
Date: 2009-08-12 21:31:14
Message-ID: 9570.1250112674@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"hwa" <helmut(dot)r(dot)wagner(at)googlemail(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Carlos B Netto 2009-08-13 06:32:15 BUG #4984: One click Installation error.
Previous Message Alvaro Herrera 2009-08-12 19:58:17 Re: BUG #4983: PostgreSQL build fails