Re: Call Function from within Function - parent / dispatch - Mailing list pgsql-admin

From Tom Lane
Subject Re: Call Function from within Function - parent / dispatch
Date
Msg-id 16790.1535034152@sss.pgh.pa.us
Whole thread Raw
In response to Call Function from within Function - parent / dispatch  (Stefan Zauchenberger <stefan@ice-sys.com>)
List pgsql-admin
Stefan Zauchenberger <stefan@ice-sys.com> writes:
> I am having a problem creating a parent function that calls different functions within based on conditions. The
functionswithin all take the exact same arguments and return the same set type. This must be a simple mistake on my
part,but not sure of the fix. 

If you're trying to pass a set result back up, the easiest way is to
use "RETURN QUERY SELECT * FROM child_function(...)".  Plain "RETURN"
only works for scalar results, and RETURN NEXT is for producing a
result-set one row at a time.

            regards, tom lane


pgsql-admin by date:

Previous
From: Stefan Zauchenberger
Date:
Subject: Call Function from within Function - parent / dispatch
Next
From: "Mark Williams"
Date:
Subject: RE: Setting up SSL for postgre