Skip site navigation (1) Skip section navigation (2)

type cast of function arguments

From: "A B" <gentosaker(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: type cast of function arguments
Date: 2008-05-15 14:44:20
Message-ID: dbbf25900805150744i2751c331y518c99ffae08ed40@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
I have written this little silly function

CREATE OR REPLACE FUNCTION recordMail(customerId_ integer, message_
VARCHAR(240)) RETURNS void AS $$
BEGIN
	INSERT INTO MailRecord (custid,message) VALUES (customerId_, message_);
END;
$$ LANGUAGE plpgsql;

And it is created, and then I do:

select recordMail(10,'asd');

and I get


ERROR:  function recordmail(integer, "unknown") does not exist
LINE 1: select recordMail(10,'asd');
               ^
HINT:  No function matches the given name and argument types. You may
need to add explicit type casts.

What is wrong here and how do I fix it?

Responses

pgsql-novice by date

Next:From: A BDate: 2008-05-15 14:47:33
Subject: Problem with function, type cast?
Previous:From: A. KretschmerDate: 2008-05-15 13:41:45
Subject: Re: Transaction inside of functions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group