Re: INS/UPD/DEL RETURNING for 8.2
От | Jonah H. Harris |
---|---|
Тема | Re: INS/UPD/DEL RETURNING for 8.2 |
Дата | |
Msg-id | 36e682920605040923s3772a1a7x292c5b759f62586a@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: INS/UPD/DEL RETURNING for 8.2 (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-patches |
On 3/2/06, Tom Lane <tgl@sss.pgh.pa.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
В списке pgsql-patches по дате отправления: