As the name suggests, a nested subprocedure allows us to write a function or procedure nested within another function or procedure. It means a function can have another function within it, just like its own variable. And, as this inner function is part of the outer function, it has no visibility outside the function that encloses it.
Get Postgres Tips and Tricks
Subscribe to our newsletter to get advanced Postgres how-tos.