Re: split rm_name and rm_desc out of rmgr.c

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: split rm_name and rm_desc out of rmgr.c
Date: 2013-02-07 17:13:54
Message-ID: 5113E0D2.9010500@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2/5/13 3:47 PM, Alvaro Herrera wrote:
> Tom Lane wrote:
>> Alvaro Herrera <alvherre(at)2ndquadrant(dot)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.

This has broken cpluspluscheck:

./src/include/access/rmgrlist.h:28:8: error: expected constructor, destructor, or type conversion before '(' token

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2013-02-07 17:18:35 Re: Vacuum/visibility is busted
Previous Message Tom Lane 2013-02-07 17:06:30 Re: proposal: ANSI SQL 2011 syntax for named parameters