Re: split rm_name and rm_desc out of rmgr.c

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: split rm_name and rm_desc out of rmgr.c
Дата
Msg-id 20130205204739.GF5753@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: split rm_name and rm_desc out of rmgr.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: split rm_name and rm_desc out of rmgr.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: split rm_name and rm_desc out of rmgr.c  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Tom Lane wrote:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:

> > The
> > approach in the second patch is to turn these into "extern const RmgrId"
> > instead, and use a second inclusion of rmgrlist.h in rmgr.c that assigns
> > them the values as consts.
>
> ... but I don't especially like that implementation, as it will result
> in nonzero code bloat and runtime cost due to replacing all those
> constants with global-variable references.  Couldn't you instead set it
> up as an enum definition?

That seems to work.  I would like to have some way of specifying that
the enum members should be of type RmgrId, but I don't think there's any
way to do that.

Patch attached.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Вложения

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

Предыдущее
От: yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi)
Дата:
Сообщение: Re: SYSV shared memory vs mmap performance
Следующее
От: Seamus Abshere
Дата:
Сообщение: Alias hstore's ? to ~ so that it works with JDBC