| From: | aditya desai <admad123(at)gmail(dot)com> |
|---|---|
| To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: difference between pg_triggers and information_schema.triggers |
| Date: | 2021-08-11 18:54:18 |
| Message-ID: | CAN0SRDHOJPk4sJNC0xjMOsxqbE78REgMmAuosPeWLpB8rTuaGQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(dot)g(dot)johnston(at)gmail(dot)com> wrote:
> On Wednesday, August 11, 2021, aditya desai <admad123(at)gmail(dot)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.
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | aditya desai | 2021-08-11 18:56:58 | PostgreSQL equivalent of UTL_HTTP |
| Previous Message | David G. Johnston | 2021-08-11 18:37:27 | Re: difference between pg_triggers and information_schema.triggers |