(it's so nice to have a buildfarm member that actively rejects naked
uses of strcasecmp). This coding is still pretty awful, though, since
it's going to be O(N^2) in the number of guc variables. May I direct
your attention to bsearch?
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.387 2007/04/21 20:02:40 petere Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.388 2007/04/22 03:52:40 tgl Exp $
*
*--------------------------------------------------------------------
*/
int i;
for (i = 0; i < num_guc_variables; i++)
- if (strcasecmp(name, guc_variables[i]->name) == 0)
+ if (guc_name_compare(name, guc_variables[i]->name) == 0)
return i;
return -1;