Re: DELETE syntax on JOINS
От | Tom Lane |
---|---|
Тема | Re: DELETE syntax on JOINS |
Дата | |
Msg-id | 9095.1251158094@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: DELETE syntax on JOINS (Bruce Momjian <bruce@momjian.us>) |
Список | pgsql-hackers |
Bruce Momjian <bruce@momjian.us> writes: > What we cannot currently do is reference test twice: > test=> DELETE FROM test USING test; > ERROR: table name "test" specified more than once > test=> DELETE FROM test t USING test t; > ERROR: table name "t" specified more than once Hmm, I had forgotten that we throw errors in these cases now. Maybe that *would* give us an escape-hatch for the other interpretation. > As far as I understand it, allowing ANSI joins in USING would simple > mean removing that error message and linking the two table aliases. Well, you'd still need to complain about DELETE FROM test USING test JOIN test ON ... Also, it's not nearly as easy as just removing the error check. There's stuff in the planner (and perhaps executor) that's dependent on the assumption that the target table isn't on the inside of an outer join, for example. Still, getting agreement on a syntax would in itself be a huge step forward. regards, tom lane
В списке pgsql-hackers по дате отправления: