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.johns...@gmail.com> wrote:

> On Wednesday, August 11, 2021, aditya desai <admad...@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.
>
>

Reply via email to