Re: Smallint needs explicit cast in psql?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Smallint needs explicit cast in psql?
Дата
Msg-id 13145.1342458230@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Smallint needs explicit cast in psql?  (Matt Musgrove <MMusgrove@efji.com>)
Ответы Re: Smallint needs explicit cast in psql?
Список pgsql-novice
Matt Musgrove <MMusgrove@efji.com> writes:
> Does psql require smallints to be explicitly cast as such?

Undecorated integer-looking constants are taken as integer, bigint, or
numeric depending on size.  Not smallint.  By and large it's best
not to use smallint as the declared argument type of a function unless
you really have to.

(We have looked into allowing small-enough literals to be taken as
smallint.  Turns out to break a whole lot of stuff, by introducing
ambiguities where there were none before, so it's not likely
to ever happen.)

            regards, tom lane

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

Предыдущее
От: Matt Musgrove
Дата:
Сообщение: Smallint needs explicit cast in psql?
Следующее
От: Matt Musgrove
Дата:
Сообщение: Re: Smallint needs explicit cast in psql?