Skip to content

Commit dbcd9d6

Browse files
committed
Remove some of the most blatant brain-fade in the recent guc patch
(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?
1 parent afcf09d commit dbcd9d6

File tree

1 file changed

+2
-2
lines changed
  • src/backend/utils/misc

1 file changed

+2
-2
lines changed

src/backend/utils/misc/guc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.387 2007/04/21 20:02:40 petere Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.388 2007/04/22 03:52:40 tgl Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -2681,7 +2681,7 @@ guc_get_index(const char *name)
26812681
int i;
26822682

26832683
for (i = 0; i < num_guc_variables; i++)
2684-
if (strcasecmp(name, guc_variables[i]->name) == 0)
2684+
if (guc_name_compare(name, guc_variables[i]->name) == 0)
26852685
return i;
26862686

26872687
return -1;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy