Re: Modification to the postgres catalog

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Carlos Chacon" <cdcarloschacon(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Modification to the postgres catalog
Date: 2006-10-11 16:54:58
Message-ID: 26161.1160585698@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Carlos Chacon" <cdcarloschacon(at)gmail(dot)com> writes:
> HI... im trying to modify the pg_class table by adding a new
> attribute.

> - include/pg_class.h: in this file, i modfify:

Did you remember to update Natts_pg_class and the Anum_ macros?

> then, i modify the macro "CLASS_TUPLE_SIZE":
> #define CLASS_TUPLE_SIZE \
> (offsetof(FormData_pg_class,relhassubclass) + sizeof(bool) +
> sizeof(bool)) /* the last bool is my bool */

Seriously ugly, should use offsetof the last attribute, ie, yours.

Also, look at the uses of Natts_pg_class_fixed --- there was some
cruftiness involved there in existing releases (it's gone in HEAD
and I'm too lazy to look back at exactly what it was...)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2006-10-11 17:12:36 Re: more anti-postgresql FUD
Previous Message Guy Rouillier 2006-10-11 16:47:55 Re: more anti-postgresql FUD