Re: Case sensitive mode in windows build option

Поиск
Список
Период
Сортировка
От Dilip kumar
Тема Re: Case sensitive mode in windows build option
Дата
Msg-id 4205E661176A124FAF891E0A6BA913526593D010@SZXEML507-MBS.china.huawei.com
обсуждение исходный текст
Ответ на Re: Case sensitive mode in windows build option  (Craig Ringer <craig@2ndquadrant.com>)
Ответы Re: Case sensitive mode in windows build option  (Craig Ringer <craig@2ndquadrant.com>)
Список 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 по дате отправления:

Предыдущее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Trigger information for auto_explain.
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Case sensitive mode in windows build option