Re: BUG #5755: Query Optimzer Bug

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Elliott Groszek <elliott(dot)groszek(at)navy(dot)mil>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5755: Query Optimzer Bug
Date: 2010-11-17 18:37:42
Message-ID: 4CE420F6.7070003@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 17.11.2010 18:05, Tom Lane wrote:
> "Elliott Groszek"<elliott(dot)groszek(at)navy(dot)mil> writes:
>> The following SQL statements produce different query plans even though
>> "phone" is not reference in the SQL!
>
>> explain update customer set login_name =
>> (select "NESSOuserName" from person,phone
>> where person.cac_cert=customer.cac_cert);
>
>> explain update customer set login_name =
>> (select "NESSOuserName" from person
>> where person.cac_cert=customer.cac_cert);
>
> That's not a bug.

Particularly, note that they produce different results if "phone" table
is empty.

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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2010-11-17 18:50:22 Re: Re: [BUGS] BUG #5650: Postgres service showing as stopped when in fact it is running
Previous Message Tom Lane 2010-11-17 16:05:30 Re: BUG #5755: Query Optimzer Bug