Sean Chittenden <sean@chittenden.org> writes:
> The upshot of things being that I want the 2nd query below (f.foo =3D
> 'b') to return foo_id and foo. Am I missing something?
I'm not real clear on what you're after, but the query results look
correct. The LEFT JOIN result (without any WHERE restriction) is
test=# SELECT f.foo_id, f.foo, b.bar_id, b.bar
test-# FROM foo AS f LEFT JOIN bar AS b on (f.foo_id = b.foo_id);
foo_id | foo | bar_id | bar
--------+-----+--------+-----
1 | a | 2 | y
1 | a | 1 | x
1 | a | 3 | z
2 | b | 4 | x
2 | b | 5 | z
3 | c | |
(6 rows)
and so the restricted outputs with the WHERE clauses look right.
What were you trying to do exactly?
regards, tom lane