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

Triggers on TRUNCATE?

From: Daniel Baldoni <pgsql(at)lcds(dot)com(dot)au>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Triggers on TRUNCATE?
Date: 2004-07-26 08:27:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
G'day folks,

Forgive this if it's totally "out there" but I was wondering why there's no
support for triggers on a TRUNCATE operation.  I note that a COPY IN fires
an INSERT trigger (if defined).

The only real use I can see for a TRUNCATE trigger would be for automatic
audit trail generation - I usually have all operations on "core" tables

FYI, I'm using 7.4.3.

As always, thanks for your time.  Ciao.

Daniel Baldoni BAppSc, PGradDipCompSci                 |  Technical Director
require 'std/'                            |  LcdS Pty. Ltd.
-------------------------------------------------------+  856B Canning Hwy
Phone/FAX:  +61-8-9364-8171                            |  Applecross
Mobile:     041-888-9794                               |  WA 6153
URL:                    |  Australia
"Any time there's something so ridiculous that no rational systems programmer
 would even consider trying it, they send for me."; paraphrased from "King Of
 The Murgos" by David Eddings.  (I'm not good, just crazy)


pgsql-hackers by date

Next:From: Christopher Kings-LynneDate: 2004-07-26 08:34:48
Subject: Re: group by query?
Previous:From: Suresh TriDate: 2004-07-26 08:18:51
Subject: Re: Improvements to PostgreSQL

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