Re: query that worked in 8.1 not working in 8.4
От | Sean Foreman |
---|---|
Тема | Re: query that worked in 8.1 not working in 8.4 |
Дата | |
Msg-id | 4A96F122.2050002@mpaygateway.com обсуждение исходный текст |
Ответ на | Re: query that worked in 8.1 not working in 8.4 (Scott Marlowe <scott.marlowe@gmail.com>) |
Список | pgsql-general |
This is not an autocast issue. These are all integers. The query plan postgres is choosing to execute looks questionable. I have provided an example of a working query and non-working query. The change is subtle and takes advantage of the questionable query plan to get the results I need. The join between customer and merchant looks incorrect. It should be joining merchant_set and merchant and then hitting customer. I'm not an expert at reading postgres query plans so I need some help figuring out if this is a postgres bug or a poorly written query and why. I think it may be a bug. > On Thu, Aug 27, 2009 at 2:13 PM, Sean > Foreman<sean.foreman@mpaygateway.com> wrote: > >> We recently upgraded postgres from 8.1 to 8.4. >> >> One of our queries stopped working and after some digging I've narrowed the >> problem down to this: >> >> table structure of interest: >> >> merchant_set >> merchant_set_id >> >> merchant >> merchant_id >> merchant_set_id >> >> customer >> customer_id >> merchant_set_id >> > > So what data types are these? I'm guessing you're being bitten by > some auto-cast that got removed in 8.3. But that's just a guess. >
В списке pgsql-general по дате отправления: