Re: Trigger violates foreign key constraint
От
Laurenz Albe
Тема
Re: Trigger violates foreign key constraint
Дата
Msg-id
92d375c65b38d69af7fb05062ebb2ea18e09f14b.camel@cybertec.at
Ответ на
Re: Trigger violates foreign key constraint (Pavel Luzanov)
Список
Дерево обсуждения
Trigger violates foreign key constraint Laurenz Albe <laurenz.albe@cybertec.at>
Re: Trigger violates foreign key constraint Tom Lane <tgl@sss.pgh.pa.us>
Re: Trigger violates foreign key constraint Noah Misch <noah@leadboat.com>
Re: Trigger violates foreign key constraint shihao zhong <zhong950419@gmail.com>
Re: Trigger violates foreign key constraint Laurenz Albe <laurenz.albe@cybertec.at>
Re: Trigger violates foreign key constraint "David G. Johnston" <david.g.johnston@gmail.com>
Re: Trigger violates foreign key constraint "David G. Johnston" <david.g.johnston@gmail.com>
Re: Trigger violates foreign key constraint Laurenz Albe <laurenz.albe@cybertec.at>
Re: Trigger violates foreign key constraint Aleksander Alekseev <aleksander@timescale.com>
Re: Trigger violates foreign key constraint Pavel Luzanov <p.luzanov@postgrespro.ru>
Re: Trigger violates foreign key constraint Pavel Luzanov <p.luzanov@postgrespro.ru>
Re: Trigger violates foreign key constraint Laurenz Albe <laurenz.albe@cybertec.at>
Re: Trigger violates foreign key constraint Tom Lane <tgl@sss.pgh.pa.us>
Re: Trigger violates foreign key constraint Aleksander Alekseev <aleksander@timescale.com>
Re: Trigger violates foreign key constraint Tom Lane <tgl@sss.pgh.pa.us>
Re: Trigger violates foreign key constraint Aleksander Alekseev <aleksander@timescale.com>
Re: Trigger violates foreign key constraint Tom Lane <tgl@sss.pgh.pa.us>
Re: Trigger violates foreign key constraint Pavel Luzanov <p.luzanov@postgrespro.ru>
Re: Trigger violates foreign key constraint Laurenz Albe <laurenz.albe@cybertec.at>
Re: Trigger violates foreign key constraint Laurenz Albe <laurenz.albe@cybertec.at>
On Fri, 2023-12-22 at 10:59 +0300, Pavel Luzanov wrote: > Please, consider small suggestion to replace last sentence. > > - This is not considered a bug, and it is the responsibility of the user > to write triggers so that such problems are avoided. > + It is the trigger programmer's responsibility to avoid such scenarios. > > To be consistent with the sentence about recursive trigger calls: [1] > "It is the trigger programmer's responsibility to avoid infinite > recursion in such scenarios." Yes, that is better - shorter and avoids passive mode. Changed. > Also I don't really like "This is not considered a bug" part, since it > looks like an excuse. In a way, it is an excuse, so why not be honest about it. The example you provided in your other message (cascading triggers fail if the table ovner has revoked the required permissions from herself) is not really about breaking foreign keys. You hit a surprising error, but referential integrity will be maintained. Patch v3 is attached. Yours, Laurenz Albe
В списке pgsql-hackers по дате отправления