Re: Case sensitive mode in windows build option

From: Dilip kumar <dilip(dot)kumar(at)huawei(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(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:35:57
Message-ID: 4205E661176A124FAF891E0A6BA913526593D010@SZXEML507-MBS.china.huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 give the 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2014-01-14 09:43:00 Re: Case sensitive mode in windows build option
Previous Message Kyotaro HORIGUCHI 2014-01-14 09:25:07 Trigger information for auto_explain.