Re: Minor improvement to delete.sgml
От
Etsuro Fujita
Тема
Re: Minor improvement to delete.sgml
Дата
Msg-id
c04315e3-7c63-5f21-a4f7-7b36962d4473@lab.ntt.co.jp
Ответ на
Re: Minor improvement to delete.sgml (Robert Haas)
Список
Дерево обсуждения
Minor improvement to delete.sgml Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Re: Minor improvement to delete.sgml Robert Haas <robertmhaas@gmail.com>
Re: Minor improvement to delete.sgml Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Re: Minor improvement to delete.sgml Robert Haas <robertmhaas@gmail.com>
On 2016/10/19 2:51, Robert Haas wrote: > On Fri, Oct 14, 2016 at 12:05 AM, Etsuro Fujita > wrote: >> I think it's better to mention that an alias is needed for the target table >> specified in the USING clause of a DELETE statement, to set up a self-join, >> as the documentation on the from_list parameter of UPDATE does. Please find >> attached a patch. > The statement you are proposing to add to the documentation isn't true. Consider a counterexample of DELETE doing a self-join of a target table: postgres=# create table t1 (c1 int); CREATE TABLE postgres=# insert into t1 values (1); INSERT 0 1 postgres=# delete from t1 using t1 where t1.c1 = t1.c1; ERROR: table name "t1" specified more than once Giving an alias to the target table t1 in the USING clause, postgres=# delete from t1 using t1 r1 where t1.c1 = r1.c1; DELETE 1 Am I missing something? Sorry for the delay. Best regards, Etsuro Fujita
В списке pgsql-hackers по дате отправления
От: Kyotaro HORIGUCHI
Дата:
От: Michael Paquier
Дата: