Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > Re: Problem wit...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 3113 of 3323
Post > Topic >>

Re: Problem with function, type cast?

by andreas.kretschmer@[EMAIL PROTECTED] ("A. Kretschmer") May 16, 2008 at 09:19 AM

am  Thu, dem 15.05.2008, um 16:47:33 +0200 mailte A B folgendes:
> 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');

Sorry, but i can't reproduce this error:

test=# create table mailrecord (custid int, message text);
CREATE TABLE
test=*# CREATE OR REPLACE FUNCTION recordMail(customerId_ integer,
message_
test(# VARCHAR(240)) RETURNS void AS $$
test$# BEGIN
test$#        INSERT INTO MailRecord (custid,message) VALUES (customerId_,
message_);
test$# END;
test$# $$ LANGUAGE plpgsql;
CREATE FUNCTION
test=*# select recordMail(10,'asd');
 recordmail
------------

(1 row)

test=*#


Which version do you have? I have 8.1.

Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

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




 1 Posts in Topic:
Re: Problem with function, type cast?
andreas.kretschmer@[EMAIL  2008-05-16 09:19:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 5:39:26 CST 2008.