Re: tighten input to float4/float8/oid

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: tighten input to float4/float8/oid
Дата
Msg-id 21489.1078376294@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: tighten input to float4/float8/oid  (Neil Conway <neilc@samurai.com>)
Список pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> I think there's a case to be made that we shouldn't accept either
> leading or trailing whitespace, but it seems too late to go down that
> path: it isn't worth breaking backward compatibility over, for one thing.

To do that we'd have to use separate code for I/O and casting.  As
an example, this current behavior is unquestionably contrary to the
spec text I cited:

regression=# select '  42'::text::int;
 int4
------
   42
(1 row)

regression=# select '  42 '::text::int;
ERROR:  invalid input syntax for integer: "  42 "
regression=#

            regards, tom lane

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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: tighten input to float4/float8/oid
Следующее
От: Claudio Natoli
Дата:
Сообщение: canonicalize_path: initdb.c -> port/path.c