Search Postgresql Archives

Re: query that worked in 8.1 not working in 8.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx> 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.


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux