From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Add support for logging the current role |
Date: | 2011-01-15 03:05:31 |
Message-ID: | 20110115030531.GX4933@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> In any case, if the GUC representation is a list of field names, I think
> the POLA demands that the system honor the list order.
Agreed. That puts us back into the question of how to make it
efficient. My best thought at the moment, which doesn't strike me as
particularly efficient, is to build an array of the columns as enum's
and then have loop through the array and use a switch() on the enum. At
least it's all integer-based there then and we're not calling strcmp()
for every field or strchr to find the next field, but couldn't we do
better?
> BTW, in case you didn't know, there are some GUCs defined as lists of
> identifiers already (look for GUC_LIST bits). Be sure to steal code.
No, I didn't.. Excellent.
Thanks!
Stephen
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2011-01-15 03:07:46 | Re: Add support for logging the current role |
Previous Message | Andrew Dunstan | 2011-01-15 02:59:41 | Re: Add support for logging the current role |