Re: [HACKERS] Refactoring identifier checks to consistently use strcmp
От | Michael Paquier |
---|---|
Тема | Re: [HACKERS] Refactoring identifier checks to consistently use strcmp |
Дата | |
Msg-id | CAB7nPqS8PUOn+qBo4gSSkuU8=gDUGzmGs8FA_sTZOdVgMDfMKA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Refactoring identifier checks to consistently use strcmp (Daniel Gustafsson <daniel@yesql.se>) |
Ответы |
Re: [HACKERS] Refactoring identifier checks to consistently use strcmp
Re: [HACKERS] Refactoring identifier checks to consistently use strcmp |
Список | pgsql-hackers |
On Tue, Nov 28, 2017 at 12:11 AM, Daniel Gustafsson <daniel@yesql.se> wrote: >> The patch needs a rebase, and there are a couple of places that need >> an extra lookup I think: >> $ git grep defname -- *.c | grep strcasecmp | wc -l >> 39 > > Rebased and handled a few more places which I had either missed in the last > round, or that had been added in the meantime. “PARALLEL” in aggregatecmds.c > is intentionally using pg_strcasecmp() due to the old-style syntax which is > still supported. This meritates a comment. Code readers may get confused. > AFAICS this covers all relevant codepaths from the 39 above. I was just looking at the tsearch code which uses pg_strcmpcase, and those are defined with makeDefElem() so you should switch to strcmp in this case as well, no? If I patch the code myself I would get an error when double-quoting, making those command more consistent with the rest of what you are patching here: create extension unaccent; alter text search dictionary unaccent (Rules = 'unaccent'); -- ok alter text search dictionary unaccent (RuLes = 'unaccent'); -- ok alter text search dictionary unaccent ("Rules" = 'unaccent'); -- error -- Michael
В списке pgsql-hackers по дате отправления: