Re: triggers, rules and alter table

From: Richard Huxton <dev(at)archonet(dot)com>
To: Sergey Karin <sergey(dot)karin(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: triggers, rules and alter table
Date: 2006-02-01 09:32:32
Message-ID: 43E08030.1010203@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Howard Cole 2006-02-01 10:04:36 Converting Text to Bytea
Previous Message Richard Huxton 2006-02-01 09:31:37 Re: postmaster crash