• Register
1 vote
557 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

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 21 views
21 views
Problems: Can anyone give the right solution You need to add a role to a VM in an offline state. How do you proceed? a. Start the VM, mounting the virtual hard disk (VHD). Then add the role. b. Create a new VHD with the added role. Replace the old VHD with the new VHD. c. Install the role to the VHD while still offline. d. Add the role to a different VM.
asked Feb 14 maddi86 5.4k points
1 vote
1 answer 12 views
12 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 Gavin 15.3k points
0 votes
2 answers 203 views
203 views
Problem : I am trying to create the table but facing below error &ldquo;Error: There is no unique constraint matching given keys for referenced table.&rdquo; How to fix the above error?
asked Jan 21 jwilliam 3.9k points
0 votes
1 answer 172 views
172 views
Problem: I am totally new to C programming, but I must code this English - French text translator by next week. It should replace the words with a given word or phrases.My texts are the following "Hello", "What" and "How are you?" and I am trying to ... the argument types testtranslator C2664 'size_t strlen(const char *)': cannot convert argument 1 from 'const char *[2]' to 'const char *'
asked Aug 29 Raphael Pacheco 4.9k points