Re: system_information.triggers & truncate triggers - Mailing list pgsql-hackers

From Daniel Farina
Subject Re: system_information.triggers & truncate triggers
Date
Msg-id CAAZKuFZCjAtFqFY4G-if0eS_CSEa1VnL6vr2-cRq1LeqGckO2Q@mail.gmail.com
Whole thread Raw
In response to Re: system_information.triggers & truncate triggers  (Jaime Casanova <jaime@2ndquadrant.com>)
Responses Re: system_information.triggers & truncate triggers
Re: system_information.triggers & truncate triggers
List pgsql-hackers
On Tue, Sep 25, 2012 at 10:55 PM, Jaime Casanova <jaime@2ndquadrant.com> wrote:
> On Wed, Sep 26, 2012 at 12:17 AM, Daymel Bonne Solís <dbonne@uci.cu> wrote:
>> Hello hackers:
>>
>> I need a list of all triggers created in my database, but the view
>> system_information.triggers does not show truncate triggers, but it does for
>> insert, update and delete triggers.
>>
>> The same problem is found in versions 9.1 and 9.2.
>>
>
> The definition of information_schema.triggers contains this:
> """
>     FROM pg_namespace n, pg_class c, pg_trigger t,
>          -- hard-wired refs to TRIGGER_TYPE_INSERT, TRIGGER_TYPE_DELETE,
>          -- TRIGGER_TYPE_UPDATE; we intentionally omit TRIGGER_TYPE_TRUNCATE
>          (VALUES (4, 'INSERT'),
>                  (8, 'DELETE'),
>                  (16, 'UPDATE')) AS em (num, text)
> """
>
> so it seems that we are not showing TRUNCATE triggers intentionally,
> but that comment fails to explain why

Wouldn't it be because TRUNCATE is a PostgreSQL language extension?

--
fdr



pgsql-hackers by date:

Previous
From: Devrim GÜNDÜZ
Date:
Subject: Re: [COMMITTERS] pgsql: Properly set relpersistence for fake relcache entries.
Next
From: "Albe Laurenz"
Date:
Subject: Re: htup header reorganization breaks many extension modules