mirror of
https://github.com/postgres/postgres.git
synced 2025-07-09 22:41:56 +03:00
Re-allow specification of a new default value for an inherited column
in CREATE TABLE, but give a warning notice. Clean up inconsistent handling of defaults and NOT NULL flags from multiply-inherited columns. Per pghackers discussion 28-Mar through 30-Mar.
This commit is contained in:
@ -81,6 +81,9 @@ CREATE TABLE student (
|
||||
CREATE TABLE stud_emp (
|
||||
percent int4
|
||||
) INHERITS (emp, student);
|
||||
NOTICE: CREATE TABLE: merging multiple inherited definitions of attribute "name"
|
||||
NOTICE: CREATE TABLE: merging multiple inherited definitions of attribute "age"
|
||||
NOTICE: CREATE TABLE: merging multiple inherited definitions of attribute "location"
|
||||
CREATE TABLE city (
|
||||
name name,
|
||||
location box,
|
||||
@ -132,6 +135,8 @@ CREATE TABLE c_star (
|
||||
CREATE TABLE d_star (
|
||||
d float8
|
||||
) INHERITS (b_star, c_star);
|
||||
NOTICE: CREATE TABLE: merging multiple inherited definitions of attribute "class"
|
||||
NOTICE: CREATE TABLE: merging multiple inherited definitions of attribute "a"
|
||||
CREATE TABLE e_star (
|
||||
e int2
|
||||
) INHERITS (c_star);
|
||||
|
@ -5,6 +5,8 @@ CREATE TABLE a (aa TEXT);
|
||||
CREATE TABLE b (bb TEXT) INHERITS (a);
|
||||
CREATE TABLE c (cc TEXT) INHERITS (a);
|
||||
CREATE TABLE d (dd TEXT) INHERITS (b,c,a);
|
||||
NOTICE: CREATE TABLE: merging multiple inherited definitions of attribute "aa"
|
||||
NOTICE: CREATE TABLE: merging multiple inherited definitions of attribute "aa"
|
||||
INSERT INTO a(aa) VALUES('aaa');
|
||||
INSERT INTO a(aa) VALUES('aaaa');
|
||||
INSERT INTO a(aa) VALUES('aaaaa');
|
||||
|
Reference in New Issue
Block a user