The following bug has been logged online:
Bug reference: 2456
Logged by: Vivekananda
Email address: r(dot)vivekanandaswamy(at)yahoo(dot)co(dot)in
PostgreSQL version: 8.1
Operating system: Windows-2000
Description: How to write user defined functions in Postgress sql
Details:
Hai,
I have good knowledge in Oracle-Pl/sql.But,now my client wants to use
PGSQL.Now i am sending function as below.
create or replace function fun_emp(eno integer) returns varchar
as
v_name varchar;
begin
select ename into v_name from emp where empno=eno;
return v_name;
end;
/
SQL>Select fun_emp(7788) from dual;
SQL>Fun_emp(7788)
-----------------
SMITH
It's work on Oracle-Pl/sql.
Now how can i implemnt this function in PGSQL?