From: | Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net> |
---|---|
To: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: pointer to feature comparisons, please |
Date: | 2007-06-14 12:06:33 |
Message-ID: | 46712F49.50708@cox.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 06/14/07 02:24, PFC wrote:
>
>>>> The DELETE should block, no?
>>> Why ?
>>> Foreign keys put an ON DELETE trigger on the referenced table
>>
>> Foreign keys that silently, automatic DELETE records?
>> Did I read that correctly?
>
> Isn't that the point of ON DELETE CASCADE ?
Where'd that come from? Did I miss something in the thread?
>>> besides checking the referencing column on insert/update... If you
>>> just implement a constraint, you only get half the functionality.
>>
>> But when I define a FK *constraint*, that's all I *want*!
>
> When you add a REFERENCE foo( bar ) foreign key and don't specify ON
> DELETE clause, I believe you get ON DELETE NO ACTION, which means the
> referenced row can't be deleted if there are referencing rows... so
> when you have a FK constraint, it actually constrains two tables, and pg
> uses share locking to ensure race conditions can't cause an inconsistent
> database.
--
Ron Johnson, Jr.
Jefferson LA USA
Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!
From | Date | Subject | |
---|---|---|---|
Next Message | Gabriele | 2007-06-14 12:13:14 | Re: PostGreSQL for a small Desktop Application |
Previous Message | Pavel Stehule | 2007-06-14 11:54:09 | Re: [SQL] function to find difference between in days between two dates |