Re: [HACKERS] Refactoring identifier checks to consistently use strcmp
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael.paquier@gmail.com>,
Robert Haas <robertmhaas@gmail.com>,
Stephen Frost <sfrost@snowman.net>,
Heikki Linnakangas <hlinnaka@iki.fi>,
Alvaro Herrera <alvherre@2ndquadrant.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2018-01-26T22:17:42Z
Lists: pgsql-hackers
> On 26 Jan 2018, at 22:32, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Michael Paquier <michael.paquier@gmail.com> writes: >> On Wed, Jan 24, 2018 at 09:47:50AM +0100, Daniel Gustafsson wrote: >>> Attached is a rebased v7 patch which has your amendments (minus >>> propname) which passes make check without errors. > >> Confirmed. I am switching the status as ready for committer for >> volatility-v7.patch then. > > Poking through this, Thanks! > I notice that there are two reloptions-related > "pg_strncasecmp" calls that did not get converted to "strncmp": > reloptions.c:804 The way I read transformRelOptions(), oldOptions is not guaranteed to come from the parser (though in reality it probably will be). The namespace isn’t either but passing an uppercase namespace should never be valid AFAICT, hence the patch changing it to case sensitive comparison. > and reloptions.h:169. Oversight, completely missed that one. cheers ./daniel
Commits
-
Avoid unnecessary use of pg_strcasecmp for already-downcased identifiers.
- fb8697b31aae 11.0 landed