From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stefan Zauchenberger <stefan@ice-sys.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Call Function from within Function - parent / dispatch
Date: Thu, 23 Aug 2018 10:22:32 -0400
Message-ID: <16790.1535034152@sss.pgh.pa.us> (raw)
In-Reply-To: <7B1A245D-F8DD-4AAB-8ACF-3C2C7F5A9563@ice-sys.com>
References: <7B1A245D-F8DD-4AAB-8ACF-3C2C7F5A9563@ice-sys.com>
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 functions within 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
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, stefan@ice-sys.com
Subject: Re: Call Function from within Function - parent / dispatch
In-Reply-To: <16790.1535034152@sss.pgh.pa.us>
* 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