Re: enum-ify resource manager's xl_info values

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: enum-ify resource manager's xl_info values
Дата
Msg-id 20130722130212.GC13444@alap2.anarazel.de
обсуждение исходный текст
Ответ на Re: enum-ify resource manager's xl_info values  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2013-07-22 08:53:53 -0400, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > Would somebody object to making the rmgr's invo value #defines like:
> > into enums?
> 
> I think that will create more problems than it fixes.  For one thing,
> the same field is used to store values that would need to be multiple
> independent enum types; and we also store additional bits into that
> field.

Oh, I don't want to change the definition of XLogRecord or such. I just
want to make the series of #defines an enum so you can write something
like
inf = record->xl_info & ~XLR_INFO_MASK;
switch ((XLogXactRecordType) info)
{   case ....;
}

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: enum-ify resource manager's xl_info values
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Using ini file to setup replication