Re: unexpected effect of FOREIGN KEY ON CASCADE DELETE - Mailing list pgsql-general

From Grzegorz Jaśkiewicz
Subject Re: unexpected effect of FOREIGN KEY ON CASCADE DELETE
Date
Msg-id AANLkTik73TGN9Ukh84R_2fIRYAH24EH83vM8DIo6wA0C@mail.gmail.com
Whole thread Raw
In response to Re: unexpected effect of FOREIGN KEY ON CASCADE DELETE  (Thom Brown <thombrown@gmail.com>)
List pgsql-general
not really, as it depends on pretty much both tables.
This is where de-normalization would actually makes sens, except for
that it wouldn't - because it will badly effect all my other queries
(joining on varchar is so slow).

I could drop FK, and replace that with my own trigger(s), but that's a
lot of mess.
Other idea, is to maintain some sort of a temp table that will hold
all names deleted, and use it. But still, not very nice nor obviuos.



--
GJ

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: how to create an admin user for restore database.
Next
From: Adrian Klaver
Date:
Subject: Re: unexpected effect of FOREIGN KEY ON CASCADE DELETE