Re: Modification to the postgres catalog

Поиск
Список
Период
Сортировка
От Carlos Chacon
Тема Re: Modification to the postgres catalog
Дата
Msg-id 34ebda740610111113w230c9bb5m25dc8e84206af781@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Modification to the postgres catalog  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Modification to the postgres catalog  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Thanks for you help...
But i modify too Natts_pg_class and the Anum macro...Only  I forgot mentionated it in the last mail. i put:
#define Natts_pg_class_fixed            25
#define Natts_pg_class                    26
....
#define Anum_pg_class_myNewAttribute        25
#define Anum_pg_class_relacl            26


I really don't understand you when you said: "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...)"...

Anyway, thanks for trying to help me....

P.D: For anyone, i still need help.... Bye.

On 10/11/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Carlos Chacon" < cdcarloschacon@gmail.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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Index Tuning Features [2]
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Patch for Win32 blocking problem