Re: Please help! - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Please help!
Date
Msg-id 12604.1150428127@sss.pgh.pa.us
Whole thread Raw
In response to Please help!  (Brandon E Hofmann <Brandon_E_Hofmann@notes.ntrs.com>)
List pgsql-hackers
Brandon E Hofmann <Brandon_E_Hofmann@notes.ntrs.com> writes:
> In plpgsql, how do you return back a result set that is determined and
> generated at runtime based on a report request?

If I understand what you are asking for, you don't.

> Also why does plpgsql require you to define what is returned?

plpgsql is not imposing this, the system as a whole does.  Else, the
parser would have no idea what to expand "*" to in
select * from myfunc(42);

There are facilities that let you use the same textual function "myfunc"
for different result column sets, but this doesn't get you off the hook
of having to tell the calling query what the column set is going to be.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Jaime Casanova"
Date:
Subject: alias for OLD and NEW in triggers
Next
From: "Qingqing Zhou"
Date:
Subject: Re: Tuple hint bits (INFOMASK) upon transaction abort