Re: pre-commit triggers
От | Andrew Dunstan |
---|---|
Тема | Re: pre-commit triggers |
Дата | |
Msg-id | 5294DC56.1070908@dunslane.net обсуждение исходный текст |
Ответ на | Re: pre-commit triggers (Simon Riggs <simon@2ndQuadrant.com>) |
Ответы |
Re: pre-commit triggers
|
Список | pgsql-hackers |
On 11/24/2013 09:42 AM, Simon Riggs wrote: > It looks to me that this idea is horribly physical and seems likely to > be badly misused. > > I don't see any way to use these that won't be quite ugly. There is no > trigger descriptor, so no way of writing a constraint sensibly, since > you'll need to make a constraint check for every commit by every user, > not just ones that touch the data you care about. And security goes > straight out the window, so these can't be used in normal application > development. > > Plus we can already do this with RegisterXactCallback() as Alvaro > points out - so if its a hack we're after, then we already have it, no > patch required. "Write a hack" is not normally advice I like to give or receive. We're after a feature that at least one other RDBMS that we know of suports. But leaving that aside, what are the restrictions, if any, in what can be done in such a callback? Are we allowed to alter the database? If so, what happens to FK constraints? Can we raise an ERROR exception? cheers andrew
В списке pgsql-hackers по дате отправления: