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