Tom Lane wrote:
Phil Endecott <spam_from_postgresql_general@xxxxxxxxxxxx> writes:
D join (M join G on (M.g=G.id)) on (D.id=M.b) where D.id=nnn
A possible workaround is to generate your query like
D left join (M join G on (M.g=G.id)) on (D.id=M.b AND M.b=nnn) where D.id=nnn
I don't suppose it would work if I did
D left join (M join G on (M.g=G.id)) on (D.id=M.b)
where (D.id=nnn AND (M.b=nnn or M.b IS NULL))
would it?
Otherwise it breaks the view, and makes the calling code rather more messy.
--Phil.
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
message can get through to the mailing list cleanly