Re: Case sensitive mode in windows build option - Mailing list pgsql-hackers

From Dilip kumar
Subject Re: Case sensitive mode in windows build option
Date
Msg-id 4205E661176A124FAF891E0A6BA913526593D010@SZXEML507-MBS.china.huawei.com
Whole thread Raw
In response to Re: Case sensitive mode in windows build option  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: Case sensitive mode in windows build option  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
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
givethe case insensitive comparison. 
Now we can input debug in any case (Debug, DEBUG, debug..) and it will work fine..

And for achieving this I used Perl 'uc' function to compare upper-cased input.

! if (uc($ARGV[0]) eq 'DEBUG') {     $bconf = "Debug"; }

Will it make any difference if I use 'lc' instead of 'uc' ?

Please correct me if I have missed something here..


Regards,
Dilip



pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Trigger information for auto_explain.
Next
From: Craig Ringer
Date:
Subject: Re: Case sensitive mode in windows build option