Hello 
can any one tell me how can I add a new cloumn in pg_class

Currently I am doing :
In pg_class.h

* In CATALOG(pg_class) BOOTSTRAP define the variable [var-name]
* define a variable for [var-name] as
#define Anum_pg_class_[var-name] [value]
* And pass default value to DATA macro for that variable.
* Change the value of
Natts_pg_class_fixed from 25 to 26
Natts_pg_class from 26 to 27.


In pg_attribute
* in #define Schema_pg_class added proper values for that [var-name].
* Then provided value to DATA macro for [var-name].

In heapam.c
I add 0 in pg_class for that variable and perform simple heap_update for related tuple in pg_class..
In this way
1. when I add variable after relacl in pg_class, it adds null for [var-nam] for tuples added in initdb.
2. when I creates a new table, it does not add the values I specified.

When I place it before relacl, initdb exits with a segmentation fault.
Is there any other file in which I have to make change ?????

Regards
Rafaqat Ali


Reply via email to