CREATE DATABASE hierarchy_test WITH LOG;

CREATE DISTINCT TYPE myInt AS integer;

CREATE ROW TYPE a_ty
( value	myInt
);

CREATE TABLE a_ta OF TYPE a_ty;

INSERT INTO a_ta VALUES(1::myInt);
INSERT INTO a_ta VALUES(2::myInt);

CREATE ROW TYPE b_ty
(val2 myint)
 UNDER a_ty;

CREATE TABLE b_ta OF TYPE b_ty UNDER a_ta;

INSERT INTO b_ta VALUES(3::myInt,4::myint);


