Re: why provide cross type arithmetic operators

Поиск
Список
Период
Сортировка
От ykhuang
Тема Re: why provide cross type arithmetic operators
Дата
Msg-id fn40l4$2vl4$1@news.hub.org
обсуждение исходный текст
Список pgsql-bugs
for example,

postgres=# select int2'1' + int8'1';
ERROR:  operator is not unique: smallint + bigint
LINE 1: select int2'1' + int8'1';
                       ^
HINT:  Could not choose a best candidate operator. You may need to add
explicit
type casts.

there are int4 + int8 and int8 + int8, but no int2 + int8, so two operators
available, they are int4 + int8 and int8 + int8,
system can't choose a best candidate operator.


"ykhuang" <hyk@ruc.edu.cn> дÈëÏûÏ¢ÐÂÎÅ:fn3n3o$1g5r$1@news.hub.org...
> there are many cross type arithmetic operators, like int2 + int4, int8 +
> int4, I think these can be deleted. Here are the reasons, after deleted,
> int2 + int4 will choose the operator int4 + int4, int8 + int4 choose int8
> + int8, Is that ok? Thanks.
>

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

Предыдущее
От: "elarfaoui abdelfatah"
Дата:
Сообщение: Default password
Следующее
От: "ykhuang"
Дата:
Сообщение: why provide cross type arithmetic operators