PL/pgSQL nested functions

Started by Jim Grayalmost 16 years ago5 messagesgeneral
Jump to latest
#1Jim Gray
jim.gray@bull.com

Are there any plans to allow PL/pgSQL functions to be nested like Oracle
allows with PL/SQL procedures?

If not, what are the best ways to convert PL/SQL nested procedures to
PL/pgSQL?

In reply to: Jim Gray (#1)
Re: PL/pgSQL nested functions

On 10/06/2010 21:23, Jim.Gray@Bull.com wrote:

Are there any plans to allow PL/pgSQL functions to be nested like Oracle
allows with PL/SQL procedures?

I don't know the answer to your question, but I'm curious - why would
you want to nest functions?

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

#3Jim Gray
jim.gray@bull.com
In reply to: Raymond O'Donnell (#2)
Re: PL/pgSQL nested functions

...why would you want to nest functions?

I am not nesting the functions myself,
but I am trying to convert existing PL/SQL code to PL/pgSQL.

From what I have seen, the nesting of functions is to modularize the code
and share global variables within the same procedure.

"Raymond O'Donnell" <rod@iol.ie>
06/10/2010 01:33 PM
Please respond to
rod@iol.ie

To
Jim.Gray@Bull.com
cc
pgsql-general@postgresql.org
Subject
Re: [GENERAL] PL/pgSQL nested functions

On 10/06/2010 21:23, Jim.Gray@Bull.com wrote:

Are there any plans to allow PL/pgSQL functions to be nested like Oracle
allows with PL/SQL procedures?

I don't know the answer to your question, but I'm curious - why would
you want to nest functions?

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

#4Scott Marlowe
scott.marlowe@gmail.com
In reply to: Jim Gray (#1)
Re: PL/pgSQL nested functions

On Thu, Jun 10, 2010 at 2:23 PM, <Jim.Gray@bull.com> wrote:

Are there any plans to allow PL/pgSQL functions to be nested like Oracle
allows with PL/SQL procedures?

If not, what are the best ways to convert PL/SQL nested procedures to
PL/pgSQL?

Well you can call one function from another, so I'd do that.

In reply to: Jim Gray (#1)
Re: PL/pgSQL nested functions

Are there any plans to allow PL/pgSQL functions to be nested like Oracle
allows with PL/SQL procedures?

If not, what are the best ways to convert PL/SQL nested procedures to
PL/pgSQL?

PostgreSQL plus advanced server (which is a proprietary derivative of
postgres) has oracle compatibility features. I'm not specifically
aware that it supports nested procedures, but it may well.

--
Regards,
Peter Geoghegan