Re: Triggers on system catalog - Mailing list pgsql-hackers

From Gurjeet Singh
Subject Re: Triggers on system catalog
Date
Msg-id AANLkTim5nH6R5i2WQEayPi2jgv1Nqfvpy2YY+5O94FYj@mail.gmail.com
Whole thread Raw
In response to Triggers on system catalog  (Shridhar Polas <shridharpolas@gmail.com>)
List pgsql-hackers
Yes, you'd need to hack Postgres to add that capabilty, but that's too darned difficult since Postgres internally does not use SQL to perform the DML operations on system catalog. I'd suggest searching for past discussions on -hackers around this topic.

Regards,

On Tue, Mar 29, 2011 at 5:37 AM, Shridhar Polas <shridharpolas@gmail.com> wrote:
Thanks Gurjeet.

You got it absolutely correct what I am trying to do.

It is clear to me that we can not write trigger on system catalog.

Can we hack postgres somehow to have triggers create on system catalog?

I am using postgres 9.0 version.

Thanks,
Shridhar



On Mon, Mar 28, 2011 at 8:03 PM, Gurjeet Singh <singh.gurjeet@gmail.com> wrote:
On Mon, Mar 28, 2011 at 10:19 AM, Shridhar Polas <shridharpolas@gmail.com> wrote:
Hi,

Is there a way to create triggers on system catalog tables like pg_class, pg_attribute etc...?

No, Postgres does not support triggers on system catalogs; we do not have DDL triggers either, if that's what you were trying to achieve.




--
Gurjeet Singh
EnterpriseDB Corporation
The Enterprise PostgreSQL Company

pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: SHMEM_INDEX_SIZE exceeded on startup
Next
From: Christopher Browne
Date:
Subject: Re: Triggers on system catalog