Problem with function, type cast?

From: "A B" <gentosaker(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Problem with function, type cast?
Date: 2008-05-15 14:47:33
Message-ID: dbbf25900805150747w15e47542ra6fb5924b30bd0eb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
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.

Isn't postgresql supposed to be able to convert it to a suitable
datatype and find the matching function?

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2008-05-15 15:28:35 Re: type cast of function arguments
Previous Message A B 2008-05-15 14:44:20 type cast of function arguments