rendered paste bodyCREATE SEQUENCE "ancestor_id_seq";CREATE TABLE "ancestor" ( "id" integer NOT NULL DEFAULT nextval('test.ancestor_id_seq'), "name" text NOT NULL UNIQUE, "type" varchar(32) NOT NULL DEFAULT 'ancestor', PRIMARY KEY ("id"));CREATE TABLE "father" ( "type" varchar(32) NOT NULL DEFAULT 'father', "option1" integer NOT NULL) INHERITS ("ancestor");CREATE TABLE "mother" ( "type" varchar(32) NOT NULL DEFAULT 'mother', "option2" integer NOT NULL) INHERITS ("ancestor");-- it's transitive, so no need to also inherit "ancestor"CREATE TABLE "kid" ( "type" varchar(32) NOT NULL DEFAULT 'kid') INHERITS ("mother","father");INSERT INTO "ancestor" (name) VALUES ('a1');INSERT INTO "father" (name,option1) VALUES ('f1', 2);INSERT INTO "mother" (name,option2) VALUES ('m1', 3);INSERT INTO "kid" (name,option1,option2) VALUES ('k1', 4, 5);SELECT * FROM ancestor; id | name | type----+------+---------- 1 | a1 | ancestor 2 | f1 | father 3 | m1 | mother 4 | k1 | kid(4 rows)