From: | "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Neil Conway" <neilc(at)samurai(dot)com>, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: INS/UPD/DEL RETURNING for 8.2 |
Date: | 2006-05-04 16:23:37 |
Message-ID: | 36e682920605040923s3772a1a7x292c5b759f62586a@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
On 3/2/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > For example, should it be possible to write:
> > FOR x in DELETE FROM t1 WHERE ... RETURNING t1.x LOOP
>
> Seems like you'd want to get there eventually, if not in the first cut.
I'd like to get this into the first release of RETURNING for 8.2.
> 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 want to get rid of all the special case code and move in this
direction, that way we can make better use of code that already exists
and is well-tested.
> 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.
Have you had any ideas on how to best accomplish this?
--
Jonah H. Harris, Database Internals Architect
EnterpriseDB Corporation
732.331.1324
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-05-04 16:35:24 | Re: Page at a time index scan |
Previous Message | Sven Suursoho | 2006-05-04 15:21:36 | Re: plpython improvements |