Re: [Proposal] Global temporary tables
От | Prabhat Sahu |
---|---|
Тема | Re: [Proposal] Global temporary tables |
Дата | |
Msg-id | CANEvxPqjhL9LrRBp2rThD=sbkWx0t1BMVe468YmfSMSa9OC2-w@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [Proposal] Global temporary tables (Prabhat Sahu <prabhat.sahu@enterprisedb.com>) |
Ответы |
Re: [Proposal] Global temporary tables
Re: [Proposal] Global temporary tables |
Список | pgsql-hackers |
Hi All,
I observe a different behavior in "temporary table" and "global temporary table".
Not sure if it is expected?
postgres=# create global temporary table parent1(a int) on commit delete rows;
CREATE TABLE
postgres=# create global temporary table child1() inherits (parent1);
CREATE TABLE
postgres=# insert into parent1 values(1);
INSERT 0 1
postgres=# insert into child1 values(2);
INSERT 0 1
postgres=# select * from parent1;
a
---
(0 rows)
postgres=# select * from child1;
a
---
(0 rows)
postgres=# create temporary table parent2(a int) on commit delete rows;
CREATE TABLE
postgres=# create temporary table child2() inherits (parent2);
CREATE TABLE
postgres=# insert into parent2 values(1);
INSERT 0 1
postgres=# insert into child2 values(2);
INSERT 0 1
postgres=# select * from parent2;
a
---
2
(1 row)
postgres=# select * from child2;
a
---
2
(1 row)
I observe a different behavior in "temporary table" and "global temporary table".
Not sure if it is expected?
postgres=# create global temporary table parent1(a int) on commit delete rows;
CREATE TABLE
postgres=# create global temporary table child1() inherits (parent1);
CREATE TABLE
postgres=# insert into parent1 values(1);
INSERT 0 1
postgres=# insert into child1 values(2);
INSERT 0 1
postgres=# select * from parent1;
a
---
(0 rows)
postgres=# select * from child1;
a
---
(0 rows)
postgres=# create temporary table parent2(a int) on commit delete rows;
CREATE TABLE
postgres=# create temporary table child2() inherits (parent2);
CREATE TABLE
postgres=# insert into parent2 values(1);
INSERT 0 1
postgres=# insert into child2 values(2);
INSERT 0 1
postgres=# select * from parent2;
a
---
2
(1 row)
postgres=# select * from child2;
a
---
2
(1 row)
Thanks,
Prabhat Sahu
В списке pgsql-hackers по дате отправления: