Queries Failing after upgrade to 9.1.6

Bug #1065632 reported by Kevin_Traas
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postgresql-9.1 (Ubuntu)
New
Undecided
Unassigned

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.

Revision history for this message
RedShift (redshift-gmx) wrote :

Is there any hint in PostgreSQL logs?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.