Thread: how to extend the catalog?
Hi, I want to extend the catalog, i think the key is pg_attribute.h, pg_class.h, pg_type.h is it enough: 1. add pg_xxx.h 2.modify pg_attribute.h, pg_class.h, pg_type.h, catname.h, indexing.h, indexing.c, Makefile i tried once, it was ok when target to template. but like a mess when target to global. what is the thing.
"kevin" <wangky@wesec.com> writes: > I want to extend the catalog, What do you want to do *exactly*? > is it enough: > 1. add pg_xxx.h > 2.modify pg_attribute.h, pg_class.h, pg_type.h, catname.h, > indexing.h, indexing.c, Makefile You shouldn't need to touch pg_attribute.h, pg_class.h, pg_type.h, unless you are hacking one of the bootstrapped system tables or adding a new table that has to be known to the bootstrapper. regards, tom lane
Yes, that is what i want to do. In fact, i want to add some audit function,like some other comercial db. Do you think it is a good idea? So, i think 2 system tables are needed, one for recording audit and the other for defining audit event. The 2 system table should be created when initdb. And, i think it may have 4 places to add codes to handle audit. logon, logoff, executor, error. And, i don't know if it is necessary to change query structure. Yes, That is what i want to do, i will do it, i need your help. regards, kevin > What do you want to do *exactly*? > > You shouldn't need to touch pg_attribute.h, pg_class.h, pg_type.h, > unless you are hacking one of the bootstrapped system tables or adding a > new table that has to be known to the bootstrapper.
Yes, that is what i want to do. In fact, i want to add some audit function,like some other comercial db. Do you think it is a good idea? So, i think 2 system tables are needed, one for recording audit and the other for defining audit event. The 2 system table should be created when initdb. And, i think it may have 4 places to add codes to handle audit. logon, logoff, executor, error. And, i don't know if it is necessary to change query structure. Yes, That is what i want to do, i will do it, i need your help. regards, kevin > What do you want to do *exactly*? > > You shouldn't need to touch pg_attribute.h, pg_class.h, pg_type.h, > unless you are hacking one of the bootstrapped system tables or adding a > new table that has to be known to the bootstrapper.
Yes, that is what i want to do. In fact, i want to add some audit function,like some other comercial db. Do you think it is a good idea? So, i think 2 system tables are needed, one for recording audit and the other for defining audit event. The 2 system table should be created when initdb. And, i think it may have 4 places to add codes to handle audit. logon, logoff, executor, error. And, i don't know if it is necessary to change query structure. Yes, That is what i want to do, i will do it, i need your help. regards, kevin > What do you want to do *exactly*? > > You shouldn't need to touch pg_attribute.h, pg_class.h, pg_type.h, > unless you are hacking one of the bootstrapped system tables or adding a > new table that has to be known to the bootstrapper.