Re: triggers, rules and alter table - Mailing list pgsql-general

From Richard Huxton
Subject Re: triggers, rules and alter table
Date
Msg-id 43E08030.1010203@archonet.com
Whole thread Raw
In response to triggers, rules and alter table  (Sergey Karin <sergey.karin@gmail.com>)
List pgsql-general
Sergey Karin wrote:
> Hi, List!
>
> I'm using pg 8.1.0
>
> this version allows to create triggers on INSERT, DELETE and UPDATE and also
> allows to create rules on SELECT, UPDATE, INSERT and DELETE.
> But I want to do some actions on ALTER TABLE ... ADD COLUMN and ALTER TABLE
> ... DROP COLUMN events. How I can handle that events in 8.1.x version?

You can't. There aren't any hooks to attach triggers to for those actions.

Could you wrap your ALTER TABLE commands in a function?

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: postmaster crash
Next
From: Howard Cole
Date:
Subject: Converting Text to Bytea