Public bug reported: A simple query that's been working since 8.x is now failing since upgrading to 9.1.6 a few days ago (from 9.1.3 installed with precise upgrade).
The query joins two tables via a lookup. The primary key field is sometimes showing up as null in the query results ?? SELECT * FROM a LEFT JOIN b ON b.id1 = a.id1 LEFT JOIN c ON c.id1 = b.id2 WHERE a.field = 'some value'; In the result set, id1 (primary key in a) is set to null zero, one, or more times. This is, obviously, a huge problem, seeing as it's the primary key field that's affected. I have worked around this issue by modifying the query as follows: SELECT a.*, c.* FROM a LEFT JOIN b ON b.id1 = a.id1 LEFT JOIN c ON c.id1 = b.id2 WHERE a.field = 'some value'; Excluding fields of b from the result set always returns valid values for id1. I have no further info at this time, but am willing to dig further and update this report if anyone has any suggestions on what to try. ** Affects: postgresql-9.1 (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to postgresql-9.1 in Ubuntu. https://bugs.launchpad.net/bugs/1065632 Title: Queries Failing after upgrade to 9.1.6 Status in “postgresql-9.1” package in Ubuntu: New Bug description: A simple query that's been working since 8.x is now failing since upgrading to 9.1.6 a few days ago (from 9.1.3 installed with precise upgrade). The query joins two tables via a lookup. The primary key field is sometimes showing up as null in the query results ?? SELECT * FROM a LEFT JOIN b ON b.id1 = a.id1 LEFT JOIN c ON c.id1 = b.id2 WHERE a.field = 'some value'; In the result set, id1 (primary key in a) is set to null zero, one, or more times. This is, obviously, a huge problem, seeing as it's the primary key field that's affected. I have worked around this issue by modifying the query as follows: SELECT a.*, c.* FROM a LEFT JOIN b ON b.id1 = a.id1 LEFT JOIN c ON c.id1 = b.id2 WHERE a.field = 'some value'; Excluding fields of b from the result set always returns valid values for id1. I have no further info at this time, but am willing to dig further and update this report if anyone has any suggestions on what to try. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postgresql-9.1/+bug/1065632/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp