Thread: Error on function parameters

Error on function parameters

From
"Ezequias Rodrigues da Rocha"
Date:
Hi list<br /><br />I am doing an statement like this:<br /><br />select insertPoints('C', '123456789', 12.5, 1,
9877000000944005,104)<br /><br />and get the following error:<br /><br /><span style="font-weight: bold;">ERROR: 
functioninserirpontos("unknown", "unknown", numeric, integer, bigint, integer) does not exist </span><br
style="font-weight:bold;" /><span style="font-weight: bold;">HINT:  No function matches the given name and argument
types.You may need to add explicit type casts.</span><br clear="all" style="font-weight: bold;" /><br />My function is
declaredlike this:<br /><br />Function base.inserirPontos(char(1), varchar(255), numeric(12,2), int8, int8, int8 )
returnsboolean<br /><br /> What I did wrong ?<br /><br />Please help me.<br />-- <br />
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<br
/>                                  Atenciosamente(Sincerely)<br />                        Ezequias Rodrigues da
Rocha<br/> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<br />A pior das democracias ainda é
melhordo que a melhor das ditaduras <br />The worst of democracies is still better than the better of dictatorships<br
/><ahref="http://ezequiasrocha.blogspot.com/">http://ezequiasrocha.blogspot.com/</a> 

Re: Error on function parameters

From
Tom Lane
Date:
"Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com> writes:
> I am doing an statement like this:

> select insertPoints('C', '123456789', 12.5, 1, 9877000000944005, 104)

> My function is declared like this:

> Function base.inserirPontos(char(1), varchar(255), numeric(12,2), int8,
> int8, int8 ) returns boolean

Well, is it insertPoints or inserirPontos?  Is schema "base" in your
search path?
        regards, tom lane


Re: Error on function parameters

From
Anton de Wet
Date:
On Wed, 30 Aug 2006, Ezequias Rodrigues da Rocha wrote:

> Hi list
>
> I am doing an statement like this:
>
> select insertPoints('C', '123456789', 12.5, 1, 9877000000944005, 104)
>
> and get the following error:
>
> ERROR:  function inserirpontos("unknown", "unknown", numeric, integer,
> bigint, integer) does not exist
> HINT:  No function matches the given name and argument types. You may need
> to add explicit type casts.
>
> My function is declared like this:
>
> Function base.inserirPontos(char(1), varchar(255), numeric(12,2), int8,
> int8, int8 ) returns boolean
>
> What I did wrong ?

Looks like 9877000000944005 is too big for an int8 and it is trying to 
find a similar function with bigint instead of integer.

So try bigint as your 5th parameter type.

Anton

--
Forgiveness is giving up all hope for a better past