Re: why it doesn't work? referential integrity - Mailing list pgsql-general

From Pavel Stehule
Subject Re: why it doesn't work? referential integrity
Date
Msg-id 162867790708110644p6ea2b9f6wb60da5294f697988@mail.gmail.com
Whole thread Raw
In response to Re: why it doesn't work? referential integrity  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: why it doesn't work? referential integrity
List pgsql-general
2007/8/11, Gregory Stark <stark@enterprisedb.com>:
>
> "Pavel Stehule" <pavel.stehule@gmail.com> writes:
>
> >   checked_by INT REFERENCES users (id) ON UPDATE CASCADE ON DELETE SET NULL,
>
> > CONTEXT:  SQL statement "UPDATE ONLY "public"."tasks" SET "worker" =
> > NULL WHERE $1 OPERATOR(pg_catalog.=) "worker""
>
> This says you mistyped the constraint above to refer to tasks(worker) instead
> of users(id). Did you?
>
> --

Im sorry. I don't understand.  It's look like wrong evaluation order:

1. delete from users
2. update tab set col = NULL

insead

1. update ... -- remove references
2. delete from users ...

Pavel Stehule



>   Gregory Stark
>   EnterpriseDB          http://www.enterprisedb.com
>
>

pgsql-general by date:

Previous
From: Gregory Stark
Date:
Subject: Re: why it doesn't work? referential integrity
Next
From: Gregory Stark
Date:
Subject: Re: why it doesn't work? referential integrity