Nested funtion

From: Sridhar N Bamandlapally <sridhar(dot)bn1(at)gmail(dot)com>
To: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>, PostgreSQL-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Nested funtion
Date: 2016-03-28 04:14:01
Message-ID: CAGuFTBW18T5OQ7miMsDFEDS+skPjQ55X2ppCXdmJBWD2SsSafQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hi

Is there any way to create nested function?

oracle to postgres migration required super function variable reference
into nested function without nested function parameter

Oracle sample:
-------------------------------
create or replace function f1(n number) return number
is
vs number:=1;
function nf1(m number) return number is
begin
return vs + m + n;
end;
begin
return nf1(2);
end;
/

run:
--------
SQL> select f1(9) from dual;

F1(9)
----------
12

Thanks
Sridhar BN

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2016-03-28 04:27:21 Re: [HACKERS] Nested funtion
Previous Message Boyan Botev 2016-03-26 19:47:11 Re: View deleted records in a table

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2016-03-28 04:27:21 Re: [HACKERS] Nested funtion
Previous Message David G. Johnston 2016-03-28 03:51:20 Re: Draft release notes for next week's releases