BUG #15565: truncate bug with tables which have temp table inherited

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: digoal(at)126(dot)com
Subject: BUG #15565: truncate bug with tables which have temp table inherited
Date: 2018-12-24 09:17:46
Message-ID: 15565-ce67a48d0244436a@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 15565
Logged by: Zhou Digoal
Email address: digoal(at)126(dot)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;

```
postgres=# select * from public.
postgres-# a;
id
----
(0 rows)

postgres=# delete from public.a
postgres-# ;
DELETE 0
postgres=# update public.a set id=1;
UPDATE 0
postgres=# \d+ public.a
Table "public.a"
Column | Type | Collation | Nullable | Default | Storage | Stats target
| Description
--------+---------+-----------+----------+---------+---------+--------------+-------------
id | integer | | | | plain |
|
Child tables: a,
pg_temp_3.a
```

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2018-12-25 00:11:11 Re: BUG #15564: Setup sets wrong data type for value in Windows Registry
Previous Message Michael Paquier 2018-12-24 07:08:46 Re: BUG #15552: Unexpected error in COPY to a foreign table in a transaction