Re: Re: (Update) Implicit smallint to boolean conversion?

Поиск
Список
Период
Сортировка
От Brice Ruth
Тема Re: Re: (Update) Implicit smallint to boolean conversion?
Дата
Msg-id 3A8BE883.624FE5D4@webprojkt.com
обсуждение исходный текст
Ответ на (Update) Implicit smallint to boolean conversion?  (Brice Ruth <brice@webprojkt.com>)
Список pgsql-general
True ... good thing that's not what I set it to :)  I used:

(c == '1') which is more appropriate, I guess. :)  That way 'f' will
still evaluate to false.

-Brice

Martijn van Oosterhout wrote:
>
> Brice Ruth wrote:
> > Fixes the problem.  This could probably be improved to:
> >
> > return ((c == 't') || (c == 'T') || (c != '0'));
> >
> > and in that way any result is 'true' and only '0' returns false (for SMALLINT).
>
> That statement doesn't have the effect you want :)
>
> 'f' != '0'
>
> --
> Martijn van Oosterhout <kleptog@cupid.suninternet.com>
> http://cupid.suninternet.com/~kleptog/

--
Brice Ruth
WebProjkt, Inc.
VP, Director of Internet Technology
http://www.webprojkt.com/

В списке pgsql-general по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: replica question
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Postmaster crashes