View Single Post

   
  #2 (permalink)  
Old 05-16-2008, 01:43 PM
Tom Lane
 
Posts: n/a
Default Re: type cast of function arguments

"A B" <gentosaker@gmail.com> writes:
> 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


Copying and pasting this example from your email works fine for me.
I speculate that you have a case-folding problem --- did you
double-quote the function name when creating it?

Another possibility is that you created it in some schema that's
not in your search path.

regards, tom lane

--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice

Reply With Quote