pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: digoal@126.com
Subject: BUG #15565: truncate bug with tables which have temp table inherited
Date: Mon, 24 Dec 2018 09:17:46 +0000
Message-ID: <15565-ce67a48d0244436a@postgresql.org> (raw)

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;

```
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
```



view thread (16+ messages)  latest in thread

Message-ID: <15565-ce67a48d0244436a@postgresql.org>
Permalink:  ../15565-ce67a48d0244436a@postgresql.org/
Also on:    postgresql.org/message-id/15565-ce67a48d0244436a@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, digoal@126.com
  Subject: Re: BUG #15565: truncate bug with tables which have temp table inherited
  In-Reply-To: <15565-ce67a48d0244436a@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox