Re: Using results from INSERT ... RETURNING

From: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Using results from INSERT ... RETURNING
Date: 2009-10-02 10:32:47
Message-ID: 4AC5D6CF.40401@cs.helsinki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas wrote:
> Thanks. I read through this patch some more tonight and I guess I am
> a bit confused about what it accomplishes. AIUI, the point here is to
> lay the groundwork for a future patch to allow writeable CTEs, and I
> guess I'm not understanding how it's going to do that.

The purpose of this patch is only to move INSERT, UPDATE and DELETE into
plan nodes because for writeable CTEs, we can't use the currently
existing way of handling those operations. My previous approach was to
only add a special-case node for RETURNING and use the top-level
INSERT/UPDATE/DELETE handling like now, but that would've lead to
copying a lot of code, as Tom pointed out in
http://archives.postgresql.org/pgsql-hackers/2009-07/msg01217.php . In
that same message, Tom suggested the current approach which to me seems
like the best way to tackle this. This patch alone doesn't accomplish
anything, but supporting writeable CTEs will be a lot easier as seen in
the git repo David pointed you to.

Regards,
Marko Tiikkaja

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2009-10-02 10:46:51 Re: Hot Standby on git
Previous Message Pavel Stehule 2009-10-02 10:01:02 Re: Issues for named/mixed function notation patch