On 3/2/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> This might tie into something that was bothering me about Jonah's
> first-cut patch, which was that he was introducing special cases into
> places where it didn't seem real appropriate (like printtup.c). I
> wonder if we should rejigger the representation of Query so that a
> FOO-RETURNING command actually *is* a SELECT in some sense, so that
> there's no need for special cases.
I was thinking along the same lines. This is Omar's patch updated to
8.2but as I get to looking through it, there are a couple things that
cleaned up. I paced around a bit today trying to theorize how this could be
done without a lot of changes and retaining the speed increase gained by not
performing two separate operations.
I'm a bit fuzzy about how this would work exactly --- you still need to
> keep track of two targetlists it seems --- but it's worth thinking
> about. I've had a bee in my bonnet for literally years about the fact
> that INSERT/SELECT really needs two levels of targetlist, as does UNION.
> Maybe if we thought a little bit larger we could clean up all of that
> messiness at one stroke.
I'm definitely open to looking into it. Any suggestions are always
Jonah H. Harris, Database Internals Architect
In response to
pgsql-patches by date
|Next:||From: Jonah H. Harris||Date: 2006-03-03 01:48:23|
|Subject: Re: INS/UPD/DEL RETURNING for 8.2|
|Previous:||From: Tom Lane||Date: 2006-03-03 01:33:42|
|Subject: Re: INS/UPD/DEL RETURNING for 8.2 |