Re: Operator is not unique

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Operator is not unique
Дата
Msg-id 13888.1569333452@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Operator is not unique  (PegoraroF10 <marcos@f10.com.br>)
Список pgsql-general
PegoraroF10 <marcos@f10.com.br> writes:
> If I do ...
> select 1::NUMERIC + 1::BIGINT;
> I get ...
> [42725] ERROR: operator is not unique: numeric + bigint Hint: Could not
> choose a best candidate operator. You might need to add explicit type casts.

This doesn't happen for me.

> This error means I have more than one way to calculate that formula ? 
> Did I create that operator erroneously ?

A more likely theory is that you made some ill-advised changes to casting
rules.  If, say, the bigint to numeric and numeric to bigint casts are
both marked implicit, the parser won't have any way to decide whether it
should use "numeric + numeric" or "bigint + bigint" here.

            regards, tom lane



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

Предыдущее
От: PegoraroF10
Дата:
Сообщение: Re: Operator is not unique
Следующее
От: Fabrízio de Royes Mello
Дата:
Сообщение: Re: Operator is not unique