Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run PostgreSQL function

Status
Not open for further replies.

089704318

IS-IT--Management
May 22, 2006
12
VN
I created a function in PostgreSQL and after that running it with Select statement. I always received the error " The function (unknown, unknown) is not existed."

Can someone help me to identify the cause and way to solve it?

Thanks,
 
give the definition of the function and the way you invoke it
 
Hi,
My function is
create or replace function getmessage(Message_id char,Form_id char,Language_id char) returns varchar as
begin
if not exists(select * from IACP_Message
where mamessage=Message_id and maForm=Form_id and manngu=Language_id)
return 'Message not exists!';
else
return IACP_Message.noidung;
end;

Thanks
 
your function expects 3 parameters, from the error you've got, it looks like you call it with only 2 parameters
 
Thanks,
I found the error here PostgreSQL did not allow uppercase.
It now run well.
However I faced another issue with Function return values.
I don't know how to run the function by declaring OUT variable
...... 'how can I declare variable t_message.
select function_name(char,char, OUT t_message varchar)

It seems silly hu? but I ame very new in PostgreSQL



 
OUT variables are usually used from the client application, you bind them to the statement and then execute it ... depends on language you use ....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top