pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bryn Llewellyn <bryn@yugabyte.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
Subject: inner subprograms ... Was: syntax question
Date: Thu, 3 Jun 2021 15:35:29 -0700
Message-ID: <83EF1ADC-64CF-4404-9F02-C6C9051F968E@yugabyte.com> (raw)
In-Reply-To: <20210603193444.GD22019@momjian.us>
References: <CADX_1aa=8woWOoOzo0iMjvkFkJC1=31+fziMaAUfFu4u7d0_xg@mail.gmail.com>
	<20210603190108.GC22019@momjian.us>
	<c58b04ac-e713-f089-8400-763a742bf86d@aklaver.com>
	<49061.1622748075@sss.pgh.pa.us>
	<20210603193444.GD22019@momjian.us>

> bruce@momjian.us wrote:
> 
> Oh, I thought he wanted to declare a function inside the function that could be called only by that function, like private functions in Oracle packages can do.  Yes, you can create a function that defines a function that can be called later.  I guess you could also create a function that _conditionally_ creates a function that it can call itself too.  My point is that you can't create a function that has function scope — they all have schema scope.

I’ve heard that EDB’s version of PostgreSQL supports inner subprograms (declared and defined within a DECLARE section) to any depth of nesting—and packages too. Is this true?

I worked at Oracle HQ for the longest time. Not a day goes by, when I need to write PL/pgSQL code, that I don’t miss these two constructs. I wish that (a future version of) vanilla PG could bring support for them.=

Message-ID: <83EF1ADC-64CF-4404-9F02-C6C9051F968E@yugabyte.com>
Permalink:  ../83EF1ADC-64CF-4404-9F02-C6C9051F968E@yugabyte.com/
Also on:    postgresql.org/message-id/83EF1ADC-64CF-4404-9F02-C6C9051F968E@yugabyte.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: bryn@yugabyte.com, bruce@momjian.us
  Subject: Re: inner subprograms ... Was: syntax question
  In-Reply-To: <83EF1ADC-64CF-4404-9F02-C6C9051F968E@yugabyte.com>
  References: <CADX_1aa=8woWOoOzo0iMjvkFkJC1=31+fziMaAUfFu4u7d0_xg@mail.gmail.com> <20210603190108.GC22019@momjian.us> <c58b04ac-e713-f089-8400-763a742bf86d@aklaver.com> <49061.1622748075@sss.pgh.pa.us> <20210603193444.GD22019@momjian.us> <83EF1ADC-64CF-4404-9F02-C6C9051F968E@yugabyte.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox