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

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-24 01:37:49
Message-ID: 20180124013749.GA1355@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 23, 2018 at 04:22:22PM +0100, Daniel Gustafsson wrote:
> On 23 Jan 2018, at 05:52, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote:
>> 2) indexam.sgml mentions using pg_strcasecmp() for consistency with the
>> core code when defining amproperty for an index AM. Well, with this
>> patch I think that for consistency with the core code that would involve
>> using strcmp instead, extension developers can of course still use
>> pg_strcasecmp.
>
> That part I’m less sure about, the propname will not be casefolded by the
> parser so pg_strcasecmp() should still be the recommendation here no?

Yes, you are right. I had a brain fade here as all the option names here
go through SQL-callable functions.

>> Those are changed as well in the attached, which applies on top of your
>> v6. I have added as well in it the tests I spotted were missing. If this
>> looks right to you, I am fine to switch this patch as ready for
>> committer, without considering the issues with isCachable and isStrict
>> in CREATE FUNCTION of course.
>
> Apart from the amproperty hunk, I’m definately +1 on adding your patch on top
> of my v6 one. Thanks for all your help and review!

OK. Could you publish a v7? I will switch the entry as ready for
committer.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2018-01-24 01:38:57 Re: Missing wal_receiver_status_interval in Subscribers section
Previous Message Peter Geoghegan 2018-01-24 01:35:03 Re: [HACKERS] MERGE SQL Statement for PG11