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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

type cast of function arguments



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?



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group