BUG #2456: How to write user defined functions in Postgress sql - Mailing list pgsql-bugs

From Vivekananda
Subject BUG #2456: How to write user defined functions in Postgress sql
Date
Msg-id 200605261242.k4QCgXnQ095668@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #2456: How to write user defined functions in Postgress sql
List pgsql-bugs
The following bug has been logged online:

Bug reference:      2456
Logged by:          Vivekananda
Email address:      r.vivekanandaswamy@yahoo.co.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?

pgsql-bugs by date:

Previous
From: "Jeff Ross"
Date:
Subject: BUG #2455: psql failing to restore a table because of a constaint violation.
Next
From: Tom Lane
Date:
Subject: Re: BUG #2457: Make fails at copydir.c / copydir.o