Re: Operator is not unique - Mailing list pgsql-general

From Tom Lane
Subject Re: Operator is not unique
Date
Msg-id 13888.1569333452@sss.pgh.pa.us
Whole thread Raw
In response to Operator is not unique  (PegoraroF10 <marcos@f10.com.br>)
List 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 by date:

Previous
From: PegoraroF10
Date:
Subject: Re: Operator is not unique
Next
From: Fabrízio de Royes Mello
Date:
Subject: Re: Operator is not unique