Re: why it doesn't work? referential integrity

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
Cc: "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: why it doesn't work? referential integrity
Date: 2007-08-11 14:35:20
Message-ID: 87r6ma16mv.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> writes:

> 2007/8/11, Gregory Stark <stark(at)enterprisedb(dot)com>:
>>
>> "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)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

There's no delete from users in evidence here.

Check how your constraints are actually defined, it doesn't look like they're
defined they way you claimed they are

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Stark 2007-08-11 14:45:02 Re: why it doesn't work? referential integrity
Previous Message Pavel Stehule 2007-08-11 13:44:05 Re: why it doesn't work? referential integrity