Re: partial "on-delete set null" constraint

Поиск
Список
Период
Сортировка
От Rafal Pietrak
Тема Re: partial "on-delete set null" constraint
Дата
Msg-id 54A82163.5000703@ztk-rp.eu
обсуждение исходный текст
Ответ на Re: partial "on-delete set null" constraint  (Alban Hertroys <haramrae@gmail.com>)
Ответы Re: partial "on-delete set null" constraint  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: partial "on-delete set null" constraint  (Alban Hertroys <haramrae@gmail.com>)
Список pgsql-general
W dniu 03.01.2015 o 16:48, Alban Hertroys pisze:
>> On 03 Jan 2015, at 15:20, Rafal Pietrak <rafal@ztk-rp.eu> wrote:
>>
[-------------------------]
>> Yes. This is precisely the "semantics" I'm trying to put into the schema: after a username is "released" from
service,all it's messages become "from unknown user".... unless thoroughly investigated :) 
> It also makes a foreign key reference unusable: There is no unique parent record to match it to, so what exactly are
youreferencing? 

Nothing.

That's precisely my point here. I'd like to have "objects" in mailboxes
table left "hanging around" after it's "disconnected" from service. FK
acting like a power cord of a vacuum cleaner: when in service: hooked
into the wall; after that vacuum cleaner stays there, only disconnected
(and the socket can be used by others).

But pondering the idea as the discussion goes, I think I'll try to use
VIEW query rewriting capabilities, to get the "SET username=NULL; then
DELETE" sequence encoded as an on delete rule of a view created on top
of mailusers table.

-R


В списке pgsql-general по дате отправления:

Предыдущее
От: Edson Carlos Ericksson Richter
Дата:
Сообщение: Replication: How to query current segments allocation relative to "Wal keep segments"?
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: partial "on-delete set null" constraint