Wrap text
|
|
test=# create table foo (a int, b int, c int);
CREATE TABLE
test=# create table foo_2004 (like foo) inherits(foo);
NOTICE: merging column "a" with inherited definition
NOTICE: merging column "b" with inherited definition
NOTICE: merging column "c" with inherited definition
CREATE TABLE
test=# create table foo_2005 (like foo) inherits(foo);
NOTICE: merging column "a" with inherited definition
NOTICE: merging column "b" with inherited definition
NOTICE: merging column "c" with inherited definition
CREATE TABLE
test=# create table foo_2006 (like foo) inherits(foo);
NOTICE: merging column "a" with inherited definition
NOTICE: merging column "b" with inherited definition
NOTICE: merging column "c" with inherited definition
CREATE TABLE
test=# insert into foo_2004 (a, b, c) select 1,1,1;
INSERT 0 1
test=# insert into foo_2005 (a, b, c) select 2,2,2;
INSERT 0 1
test=# insert into foo_2006 (a, b, c) select 3,3,3;
INSERT 0 1
test=# select * from foo;
a | b | c
---+---+---
1 | 1 | 1
2 | 2 | 2
3 | 3 | 3
(3 rows)
|