Re: Rejection of the smallest int8

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Rejection of the smallest int8
Дата
Msg-id 19439.1006365271@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Rejection of the smallest int8  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Rejection of the smallest int8  (sugita@sra.co.jp)
Список pgsql-patches
I said:
> If you can see a way around that, we're all ears ...

Of course there's always the brute-force solution:

    if (strcmp(ptr, "-9223372036854775808") == 0)
       return -9223372036854775808;
    else
       <<proceed with int8in>>

(modulo some #ifdef hacking to attach the correct L or LL suffix to the
constant, but you get the idea)

This qualifies as pretty durn ugly, but might indeed be more portable
than any other alternative.  Comments?

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Rejection of the smallest int8
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Rejection of the smallest int8