Re: poll: CHECK TRIGGER?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: poll: CHECK TRIGGER?
Дата
Msg-id 12653.1330965670@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: poll: CHECK TRIGGER?  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: poll: CHECK TRIGGER?
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I confess to some bafflement about why we need dedicated syntax for
> this, or even any kind of core support at all.  What would be wrong
> with defining a function that takes regprocedure as an argument and
> does whatever?  Sure, it's nicer syntax, but we've repeatedly rejected
> patches that only provided nicer syntax on the grounds that syntax is
> not free, and therefore syntax alone is not a reason to change the
> core grammar.  What makes this case different?

There's definitely something to be said for that, since it entirely
eliminates the problem of providing wildcards and control over which
function(s) to check --- the user could write a SELECT from pg_proc
that slices things however he wants.

The trigger case would presumably take arguments matching pg_trigger's
primary key, viz check_trigger(trig_rel regclass, trigger_name name).

But as for needing "core support", we do need to extend the API for PL
validators, so it's not like this could be done as an external project.
        regards, tom lane


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Scaling XLog insertion (was Re: Moving more work outside WALInsertLock)
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: RFC: Making TRUNCATE more "MVCC-safe"