Re: difference between pg_triggers and information_schema.triggers

Поиск
Список
Период
Сортировка
От aditya desai
Тема Re: difference between pg_triggers and information_schema.triggers
Дата
Msg-id CAN0SRDHOJPk4sJNC0xjMOsxqbE78REgMmAuosPeWLpB8rTuaGQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: difference between pg_triggers and information_schema.triggers  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-performance
Seems like multiple entries in information_schema.triggers for INSERT/UPDATE/DELETE. Understood thanks.

postgres=# select tgname,tgtype  from pg_trigger;
       tgname       | tgtype
--------------------+--------
 insert_empployee   |     31
 insert_empployee_1 |     31
(2 rows)


postgres=# select tgname  from pg_trigger;
       tgname
--------------------
 insert_empployee
 insert_empployee_1
(2 rows)


postgres=# select trigger_name,event_manipulation from information_schema.triggers;
    trigger_name    | event_manipulation
--------------------+--------------------
 insert_empployee   | INSERT
 insert_empployee   | DELETE
 insert_empployee   | UPDATE
 insert_empployee_1 | INSERT
 insert_empployee_1 | DELETE
 insert_empployee_1 | UPDATE
(6 rows)

Regards,
Aditya.

On Thu, Aug 12, 2021 at 12:07 AM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Wednesday, August 11, 2021, aditya desai <admad123@gmail.com> wrote:
Hi All,
What is the difference between pg_triggers and information_schema.triggers? I want to list all triggers in the database.

Read the docs for information_schema.triggers.
 
What is the best way to list all objects in PostgreSQL?(similar to all_objects in Oracle).


With pg_catalog tables.  But I’m not aware of anything that combines all object types into a single result.  Seems like an easy enough query to put together though.

David J.

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: difference between pg_triggers and information_schema.triggers
Следующее
От: aditya desai
Дата:
Сообщение: PostgreSQL equivalent of UTL_HTTP