Skip site navigation (1) Skip section navigation (2)

Re: system_information.triggers & truncate triggers

From: Daymel Bonne Solís <dbonne(at)uci(dot)cu>
To: Daniel Farina <daniel(at)heroku(dot)com>
Cc: Jaime Casanova <jaime(at)2ndquadrant(dot)com>, postgres-devel <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: system_information.triggers & truncate triggers
Date: 2012-09-26 11:40:02
Message-ID: 5062E992.6040904@uci.cu (view raw or flat)
Thread:
Lists: pgsql-hackers
On 09/26/2012 03:08 AM, Daniel Farina wrote:
> On Tue, Sep 25, 2012 at 10:55 PM, Jaime Casanova <jaime(at)2ndquadrant(dot)com> wrote:
>> On Wed, Sep 26, 2012 at 12:17 AM, Daymel Bonne Solís <dbonne(at)uci(dot)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?
>
I think this case should be explicitly stated in the documentation.

Regards.

10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS INFORMATICAS...
CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION

http://www.uci.cu
http://www.facebook.com/universidad.uci
http://www.flickr.com/photos/universidad_uci


In response to

pgsql-hackers by date

Next:From: Petr ChmelarDate: 2012-09-26 12:34:10
Subject: Re: Enum binary access
Previous:From: Andres FreundDate: 2012-09-26 11:13:03
Subject: Re: pg_reorg in core?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group