From: | Rafaqat Ali <smoken0(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | How to add column in pg_class |
Date: | 2005-09-06 05:07:33 |
Message-ID: | b15f5be205090522071fe167e2@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2005-09-06 07:35:20 | Re: statement logging / extended query protocol issues |
Previous Message | Joe Conway | 2005-09-06 04:22:25 | Re: Attention PL authors: want to be listed in template |