diff options
Diffstat (limited to 'src/test/regress/expected/inherit.out')
-rw-r--r-- | src/test/regress/expected/inherit.out | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/test/regress/expected/inherit.out b/src/test/regress/expected/inherit.out index 6ca59e799bf..e6fc8bcb575 100644 --- a/src/test/regress/expected/inherit.out +++ b/src/test/regress/expected/inherit.out @@ -539,3 +539,34 @@ CREATE TEMP TABLE z (b TEXT, PRIMARY KEY(aa, b)) inherits (a); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'z_pkey' for table 'z' INSERT INTO z VALUES (NULL, 'text'); -- should fail ERROR: ExecInsert: Fail to add null value in not null attribute aa +-- Check UPDATE with inherited target and an inherited source table +create temp table foo(f1 int, f2 int); +create temp table foo2(f3 int) inherits (foo); +create temp table bar(f1 int, f2 int); +create temp table bar2(f3 int) inherits (bar); +insert into foo values(1,1); +insert into foo values(3,3); +insert into foo2 values(2,2,2); +insert into foo2 values(3,3,3); +insert into bar values(1,1); +insert into bar values(2,2); +insert into bar values(3,3); +insert into bar values(4,4); +insert into bar2 values(1,1,1); +insert into bar2 values(2,2,2); +insert into bar2 values(3,3,3); +insert into bar2 values(4,4,4); +update bar set f2 = f2 + 100 where f1 in (select f1 from foo); +SELECT relname, bar.* FROM bar, pg_class where bar.tableoid = pg_class.oid; + relname | f1 | f2 +---------+----+----- + bar | 4 | 4 + bar | 1 | 101 + bar | 2 | 102 + bar | 3 | 103 + bar2 | 4 | 4 + bar2 | 1 | 101 + bar2 | 2 | 102 + bar2 | 3 | 103 +(8 rows) + |