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 <shridharpo...@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.gurj...@gmail.com>wrote: > >> On Mon, Mar 28, 2011 at 10:19 AM, Shridhar Polas <shridharpo...@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