Re: [HACKERS] Refactoring identifier checks to consistently use strcmp

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Refactoring identifier checks to consistently use strcmp
Date: 2018-01-26 22:17:42
Message-ID: 1EA22A7C-1EC1-451F-AB30-FEEF302FDBD4@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 26 Jan 2018, at 22:32, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Michael Paquier <michael(dot)paquier(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rady, Doug 2018-01-26 22:27:47 Re: PATCH: pgbench - option to build using ppoll() for larger connection counts
Previous Message Tom Lane 2018-01-26 21:32:17 Re: [HACKERS] Refactoring identifier checks to consistently use strcmp