No function matches the given name and argument types

后端 未结 3 2073
孤城傲影
孤城傲影 2020-12-03 10:39

My function is:

 CREATE OR REPLACE FUNCTION FnUpdateSalegtab09
(
 iacyrid Integer,iRepId Integer,iDrId Integer,ivrid Integer,imode smallint,itrno 
varchar,it         


        
3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-03 11:30

    That error means that a function call is only matched by an existing function if all its arguments are of the same type and passed in same order. So if the next f() function

    create function f() returns integer as $$ 
        select 1;
    $$ language sql;
    

    is called as

    select f(1);
    

    It will error out with

    ERROR:  function f(integer) does not exist
    LINE 1: select f(1);
                   ^
    HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
    

    because there is no f() function that takes an integer as argument.

    So you need to carefully compare what you are passing to the function to what it is expecting. That long list of table columns looks like bad design.

提交回复
热议问题