Re: Triggers on system catalog

Поиск
Список
Период
Сортировка
Искать
От
Jan Wieck
Тема
Re: Triggers on system catalog
Дата
Msg-id
4D939656.6020903@Yahoo.com
Ответ на
Список
Дерево обсуждения
Triggers on system catalog Shridhar Polas <shridharpolas@gmail.com>
Re: Triggers on system catalog Gurjeet Singh <singh.gurjeet@gmail.com>
Re: Triggers on system catalog Christopher Browne <cbbrowne@gmail.com>
Re: Triggers on system catalog Robert Haas <robertmhaas@gmail.com>
Re: Triggers on system catalog Stephen Frost <sfrost@snowman.net>
Re: Triggers on system catalog Robert Haas <robertmhaas@gmail.com>
Re: Triggers on system catalog Jan Wieck <JanWieck@Yahoo.com>
Re: Triggers on system catalog Jim Nasby <jim@nasby.net>
Re: Triggers on system catalog David Fetter <david@fetter.org>
Re: Triggers on system catalog Christopher Browne <cbbrowne@gmail.com>
On 3/30/2011 9:49 AM, Robert Haas wrote:
> On Tue, Mar 29, 2011 at 9:40 PM, Stephen Frost  wrote:
>>  * Robert Haas (robertmhaas@gmail.com) wrote:
>>>  I do think we need some kind way of capturing DDL events, though. I wonder if the object-access-hook stuff KaiGai and I did to support SE-PostgreSQL could be extended to meet this need...
>>
>>  My inclination would be 'probably', but it's not likely to really be the
>>  way we'd want to provide generalized DDL triggers..
>
> I guess I was imagining that DDL triggers would be primarily important
> for things like Slony, that are already writing C code anyway, but
> maybe that's overly optimistic...
>

Slony is using C code in every performance critical path. Other than 
that, we are perfectly happy with PL/pgSQL code.

What I would envision for DDL triggers is that they first don't fire on 
an object type, but rather on a command completion code, like "CREATE 
TABLE" or "DROP SCHEMA".

To do anything useful with that of course would require that all DDL 
does go through tcop's ProcessUtility and actually synthesizes a proper 
Utility parsetree. That isn't the case today, so there would be some 
previous clean up work to be done.


Jan

-- 
Anyone who trades liberty for security deserves neither
liberty nor security. -- Benjamin Franklin

В списке pgsql-hackers по дате отправления
От: Selena Deckelmann
Дата:
От: Robert Haas
Дата:
FAQ