| From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: split rm_name and rm_desc out of rmgr.c |
| Date: | 2013-02-05 20:47:39 |
| Message-ID: | 20130205204739.GF5753@alvh.no-ip.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
| Attachment | Content-Type | Size |
|---|---|---|
| split-rm_desc-4.patch | text/x-diff | 6.0 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dimitri Fontaine | 2013-02-05 21:35:54 | Re: sql_drop Event Trigger |
| Previous Message | Tom Lane | 2013-02-05 18:29:07 | Re: split rm_name and rm_desc out of rmgr.c |