Seeing where a given trigger function is in use?

Поиск
Список
Период
Сортировка
Искать

Seeing where a given trigger function is in use?

От:
Wells Oliver <wells.oliver@gmail.com>
Дата:
Trying to track down every table that is using a certain trigger function, what's the best way to do that?

--

Re: Seeing where a given trigger function is in use?

От:
Jerry Sievers <gsievers19@comcast.net>
Дата:
Wells Oliver  writes:

> Trying to track down every table that is using a certain trigger
> function, what's the best way to do that?

Have a look at the fields tgrelid and tgfoid in your pg_trigger catalog
where you will be enlightened :-)

For starters...

select tgrelid::regclass, tgfoid::regproc from pg_trigger;

Enjoy!

>
> --
> Wells Oliver
> wells.oliver@gmail.com
>
>

-- 
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net


FAQ