Commit 648c0918 authored by Tom Lane's avatar Tom Lane

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.
parent 188e0fe4
This diff is collapsed.
......@@ -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');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment