Grzegorz Jaśkiewicz <gryzman@xxxxxxxxx> [2009-08-13 14:23]: > On Thu, Aug 13, 2009 at 12:36 PM, Radoslaw Zielinski<radek@xxxxxxxxxxxxx> wrote: [...] >> "kandydaci_fk_id_rekordu" FOREIGN KEY (id_rekordu) REFERENCES rekordy(id) ON DELETE CASCADE [...] > since you do LEFT JOIN, indeed you can get r.id to be null. There is a foreign key on this field, and it's the only one used in the JOIN condition. LEFT was only used to demonstrate the issue in a single query. -- Radosław Zieliński <radek@xxxxxxxxxxxxx>
Attachment:
pgpWR4i5y7dUk.pgp
Description: PGP signature