• Register
1 vote
3.2k views

Problem :

Getting following error while executing function
no function matches the given name and argument types. you might need to add explicit type casts.
6.9k points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

Error message says 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 suppose if the next f() function

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

is called as

select f(1);

It will throw error out with

ERROR:  function f(integer) does not exist
LINE 1: select f(1);
               ^
So 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. 

38.6k points

Related questions

0 votes
1 answer 34 views
34 views
Problem: What am I going to do about it : No operator matches the given name and argument type(s). you might need to add explicit type casts.?
asked Jun 10 Mezbah 130k points
0 votes
1 answer 49 views
49 views
Problem: I have a question about the promotion of primitive types in Java. As we can see in the following example, one of the methods does not compile due to an error of type mismatch. Each method returns the same value but in different types. The version of primitive long ... ; // valid } Long getWrapperLong() { return 12; // Error: type mismatch } Byte getWrapperByte() { return 12; // valid }
asked Apr 26 sumaiya simi 43.9k points
0 votes
1 answer 25 views
25 views
Problem: I am trying to convert my string formatted value to date type with the format dd/MM/yyyy. this.Text="22/11/2009"; DateTime date = DateTime.Parse(this.Text); What is the problem?
asked Mar 22 ummesalma 29.1k points
0 votes
1 answer 16 views
16 views
Problem: I would like to make a function that can accept any incoming variable, regardless of type (int, double, String or other objects), and then possibly determine the type of variable and act conditionally on the type.How can I do this?
asked Apr 26 sumaiya simi 43.9k points
0 votes
1 answer 10 views
10 views
Problem: Need an answer for this : Explicit casting is always required to cast
asked May 30 Chi Omega 168k points
0 votes
1 answer 5 views
5 views
Problem: Please, somebody, assist me : The same java array can store primitive types and reference types.
asked Jun 19 asha 121k points
0 votes
2 answers 29 views
29 views
Problem: How do I solve this issue: Primitive and nonprimitive data types java?
asked May 21 akhi 125k points
0 votes
1 answer 30 views
30 views
Problem: Is there some way to solve this? > Only numeric data types can be added and subtracted in sql.
asked May 8 Isac Christiaan 103k points
1 vote
1 answer 49 views
49 views
Problem: Hello guys, I am a novice in the programming world. I&rsquo;ve started learning with the C/C++ language. I&rsquo;ve got a piece of C++ code with two classes. The program is throwing a compile-time error does not name a type I am ... receiveMessage(); vector<Message> *dataMessageList; }; I am looking forward to having a legitimate solution to the problem. Thanks for your kind concern
asked Apr 29, 2020 Gavin 15.3k points
0 votes
1 answer 7 views
7 views
Problem : C++ invalid types for array subscript
asked Jul 26 Siam55 110k points