Content-Length: 275386 | pFad | http://github.com/postgrespro/postgres/commit/dbcd9d6160ad940d6216e7f3247409b13f64980e

D1 Remove some of the most blatant brain-fade in the recent guc patch · postgrespro/postgres@dbcd9d6 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/dbcd9d6160ad940d6216e7f3247409b13f64980e

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy