Re: list triggers ?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: list triggers ?
Дата
Msg-id 20020121100326.I95108-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на list triggers ?  ("Urs Steiner" <postgresql@darkstone.ch>)
Список pgsql-sql
On Mon, 21 Jan 2002, Urs Steiner wrote:

> part of the output of this command was:
>
> NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY
> check(s)
> CREATE
>
> now, the creation is actually OK. But how do i find out which triggers
> exist and what they look like ? (generically, in this case i assume it
> to be some default, available fropm the docu)

It depends on what you want to see.

select * from pg_trigger; will give you a list of the triggers.  You'd
need to join it with pg_class and pg_proc to get the table name and
function name being called. Something like:select relname, tgname, tgtype, proname, prosrc, tgisconstraint,
tgconstrname, tgconstrrelid, tgdeferrable, tginitdeferred, tgnargs,
tgattr, tgargs from (pg_trigger join pg_class on tgrelid=pg_class.oid)
join pg_proc on (tgfoid=pg_proc.oid);

If you want to see what the triggers are doing, in the case of the foreign
key ones the code's in C in src/backend/utils/adt/ri_triggers.c I
believe.



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

Предыдущее
От: Marius Andreiana
Дата:
Сообщение: support for transact-sql?
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: support for transact-sql?