From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PATCH] Support for foreign keys with arrays |
Date: | 2011-11-17 05:44:54 |
Message-ID: | 2334.1321508694@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Josh Berkus <josh(at)agliodbs(dot)com> writes:
>> BTW, has anyone thought through whether this is a sane idea at all?
>> It seems to me to be full of cases that will require rather arbitrary
>> decisions, like whether ON DELETE CASCADE should involve deleting the
>> whole row or just one array element.
> One array element, presumably.
Um, why? One reasonable interpretation of an array reference is that
the row depends on *all* of the referenced pkeys. Also, if you do
delete one array element at a time, what do you do when the array
becomes empty --- delete the row, or not, and in each case what's your
semantic justification for that choice?
In short, "presumably" doesn't cut it here.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Dimitri Fontaine | 2011-11-17 08:50:10 | Re: Adding Node support in outfuncs.c and readfuncs.c |
Previous Message | Jaime Casanova | 2011-11-17 05:26:10 | Re: [PATCH] Support for foreign keys with arrays |