Re: Case sensitive mode in windows build option

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Dilip kumar <dilip(dot)kumar(at)huawei(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Case sensitive mode in windows build option
Date: 2014-01-14 09:43:00
Message-ID: 52D506A4.6060409@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01/14/2014 05:35 PM, Dilip kumar wrote:
> On 01/14/2014 11:25 AM Craig Ringer Wrote,
>
>>> As per current behavior if user want to build in debug mode in
>>> windows, then he need to give debug in capital letters (DEBUG),
>>>
>>> I think many user will always make mistake in giving this option, in
>>> my opinion we can make it case insensitive.
>>
>> The idea seems reasonable, the implementation does not. You've changed
>> the meaning rather more than making it case insensitive.
>>
>> Use the Perl 'lc' function to compare a lower-cased input instead.
>>
>> http://perldoc.perl.org/functions/lc.html
>
> I think I have done the same thing, converted user input to upper case and compared with DEBUG, so this will always give the case insensitive comparison.
> Now we can input debug in any case (Debug, DEBUG, debug..) and it will work fine..

You're completely right. My apologies. I'm not used to reading that
awful (IMO) context-diff format - despite it being the official standard
for PostgreSQL, I still misread it on a regular basis.

I saw:

! if (uc($ARGV[0]) eq 'DEBUG')
...
! elsif (uc($ARGV[0]) ne "RELEASE")

and thought "WTF?".

In fact, the WTF is all me.

Please disregard.

This seems quite sensible. Please add it to the commitfest app if it
isn't there already:

http://commitfest.postgresql.org/

and I'll sign up as a reviewer so I can do some build-testing on it
after the rather pressing deadline I've got in the next couple of days
has passed.

If you don't hear from me by Friday, poke me.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 2014-01-14 09:57:13 Re: nested hstore patch
Previous Message Dilip kumar 2014-01-14 09:35:57 Re: Case sensitive mode in windows build option