Re: [GENERAL] select distinct in a subquery bug/problem

2012-08-11 Thread Dan Halbert
On 8/11/2012 2:21 PM, Raymond O'Donnell wrote: On 11/08/2012 04:32, Dan Halbert wrote: 1. select count(t1_id) from t1 where t1_id not in (select distinct t1_id from t2 limit 1103) ==> 13357 [CORRECT result] 2. select count(t1_id) from t1 where t1_id not in (select distinct t1_id from t2 limi

Re: [GENERAL] select distinct in a subquery bug/problem

2012-08-11 Thread Raymond O'Donnell
On 11/08/2012 04:32, Dan Halbert wrote: > In version 9.1.4-0ubuntu12.04: > > > > Hi - I am getting wrong answers from a certain kind of query, and have > narrowed it down to a change in the query plan between two similar > queries. The two queries below use different query plans, and generate >

Re: [GENERAL] select distinct in a subquery bug/problem

2012-08-10 Thread Tom Lane
"Dan Halbert" writes: > 1. select count(t1_id) from t1 where t1_id not in (select distinct t1_id from > t2 limit 1103) ==> 13357 [CORRECT result] > 2. select count(t1_id) from t1 where t1_id not in (select distinct t1_id from > t2 limit 1104) ==> 0 [WRONG result; should be close to 13357]