Re: PostgreSQL roadmap for 8.2 and beyond.

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Kevin McArthur <postgresql-list(at)stormtide(dot)ca>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PostgreSQL roadmap for 8.2 and beyond.
Date: 2005-10-16 12:56:42
Message-ID: 20051016125638.GC5779@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Oct 16, 2005 at 01:20:45AM -0700, Kevin McArthur wrote:
> Don't forget insert/update returning. With the deprecation of OID's this
> functionality is becoming more and more important when using custom types
> and column defaults.

I use currval/nextval and have never actually needed such a feature,
though I can imagine it might be useful.

ISTM though this wouldn't be too hard to do. The executor already
takes a pointer to the function to send the output rows to. So, fiddle
the toplevel plannode to add the returning columns to the output and
when it receives the tuple split it into the part to be inserted and
the part to be returned.

> Some method for plpgsql to handle the result sets returned and save to a
> variable would be important for this feature too. Select into works but it
> would be silly to see something like select a into somevariable from (insert
> into tablename (a) default values returning a) instead of an extension to
> the insert statement itself.

How do other databases deal with this?

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2005-10-16 13:25:49 Question about Ctrl-C and less
Previous Message Martijn van Oosterhout 2005-10-16 12:16:20 Re: A costing analysis tool