Re: Re: postgres TODO
Jan Wieck <janwieck@t-online.de>
From: JanWieck@t-online.de (Jan Wieck)
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL HACKERS <pgsql-hackers@postgresql.org>
Date: 2000-07-12T09:05:21Z
Lists: pgsql-hackers
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 targetlist restricted to Var nodes.
This doesn't require any changes in the FE/BE protocol. And a
client using this new feature just expects TUPLES_OK instead
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 #