Re: BUG #15565: truncate bug with tables which have temp tableinherited

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: BUG #15565: truncate bug with tables which have temp tableinherited
Дата
Msg-id 0285c6d1-2d11-2f2c-6fae-d4575cdc3c7b@lab.ntt.co.jp
обсуждение исходный текст
Ответ на BUG #15565: truncate bug with tables which have temp table inherited  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #15565: truncate bug with tables which have temp table inherited  (David Rowley <david.rowley@2ndquadrant.com>)
Список pgsql-bugs
Hi,

On 2018/12/24 18:17, PG Bug reporting form wrote:
> The following bug has been logged on the website:
> 
> Bug reference:      15565
> Logged by:          Zhou Digoal
> Email address:      digoal@126.com
> PostgreSQL version: 11.1
> Operating system:   CentOS 7.x x64
> Description:        
> 
> ```
> create table public.a (id int);
> ```
> 
> sesssion a:
> 
> ```
> create temp table a (like public.a) inherits(public.a);
> ```
> 
> session b:
> ```
> create temp table a (like public.a) inherits(public.a);
> ```
> 
> any session:
> 
> ```
> postgres=# truncate public.a;
> ERROR:  cannot truncate temporary tables of other sessions
> ```
> 
> but delete,select,update is ok;

I'm not sure if the error being shown is a bug, but maybe we could remove
the error by making truncate do the same thing as select/update/delete,
that is, ignore child tables that are temporary of tables of other
sessions.  Attached patch to do that.

Thanks,
Amit

Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #15565: truncate bug with tables which have temp tableinherited
Следующее
От: Amit Langote
Дата:
Сообщение: Re: BUG #15552: Unexpected error in COPY to a foreign table in atransaction