Обсуждение: Seeing where a given trigger function is in use?

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

Seeing where a given trigger function is in use?

От
Wells Oliver
Дата:
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
Дата:
Wells Oliver <wells.oliver@gmail.com> 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