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

Re: Truncate Triggers

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Decibel! <decibel(at)decibel(dot)org>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Truncate Triggers
Date: 2008-01-29 00:09:13
Message-ID: 20080129000913.GG1817@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-hackers
Decibel! wrote:
> On Fri, Jan 25, 2008 at 11:40:19AM +0000, Simon Riggs wrote:
> > (for 8.4 ...)
> > I'd like to introduce triggers that fire when we issue a truncate:
> 
> Rather than focusing exclusively on TRUNCATE, how about "triggers" that
> fire whenever any kind of DDL operation is performed? (Ok, truncate is
> more DML than DDL, but still).

I don't think it makes sense in general.  For example, would we fire
triggers on CLUSTER?  Or on ALTER TABLE / SET STATISTICS?

TRUNCATE seems a special case that needs it.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

pgsql-hackers by date

Next:From: Ron MayerDate: 2008-01-29 00:13:09
Subject: Re: [PATCHES] Proposed patch: synchronized_scanning GUCvariable
Previous:From: Alvaro HerreraDate: 2008-01-28 23:59:09
Subject: Re: Strange locking choices in pg_shdepend.c

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