Re: type cast of function arguments

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "A B" <gentosaker(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: type cast of function arguments
Date: 2008-05-15 15:28:35
Message-ID: 5363.1210865315@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"A B" <gentosaker(at)gmail(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message A B 2008-05-16 05:36:43 Re: type cast of function arguments
Previous Message A B 2008-05-15 14:47:33 Problem with function, type cast?