About adding a new filed to a struct in primnodes.h

Поиск
Список
Период
Сортировка
От Andy Fan
Тема About adding a new filed to a struct in primnodes.h
Дата
Msg-id CAKU4AWp7zCdGsQ7pR_Eza1wrbb1fwb6X2c7RE6XoNKfg1+_nqg@mail.gmail.com
обсуждение исходный текст
Ответы Re: About adding a new filed to a struct in primnodes.h
Список pgsql-hackers
Hi: 

For example, we added a new field in a node  in primnodes.h

struct FuncExpr
{

 +  int newf; 
};

then we modified the copy/read/out functions for this node.  In _readFuncExpr,
we probably add something like 

static FuncExpr
_readFuncExpr(..)
{
..
+ READ_INT_FILED(newf); 
}; 

Then we will get a compatible issue if we create a view with the node in 
the older version and access the view with the new binary.  I think we can
have bypass this issue easily with something like 

READ_INT_FIELD_UNMUST(newf, defaultvalue); 

However I didn't see any code like this in our code base.   does it doesn't 
work or is it something not worth doing? 

--
Best Regards
Andy Fan

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Custom compression methods
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Remove cache_plan argument comments to ri_PlanCheck