Tom Lane wrote:
>
> Philip's INSERT ... RETURNING idea could support returning TID and
> table OID as a special case, and it has the saving grace that it
> won't affect apps that don't use it...
I like that one alot more too. It should be relatively easy to add a list of attributes (specified after
RETURNING) to the querytree. Then send out a regular result set of tuples built from the requested attributes of
the new tuple (at INSERT/UPDATE) or the old one (at DELETE) during the executor run. Or maybe both and
specified as NEW.attname vs. OLD.attnam? Then it needs AS too, making the attribute list looking like a
targetlistrestricted to Var nodes.
This doesn't require any changes in the FE/BE protocol. And a client using this new feature just expects
TUPLES_OKinstead of COMMAND_OK when using the new functionality.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #