CREATE TABLE cities ( name text , population float , altitude int -- in feet ); CREATE TABLE capitals ( state char(2) ) INHERITS (cities); SELECT name , altitude FROM cities WHERE altitude > 50; SELECT name , altitude FROM ONLY cities WHERE altitude > 50; create type phone_type as ( num varchar(12) , type varchar(50) ); create table person ( id int , name varchar(30) , phone phone_type ) ; insert into person values( 1 , 'Kara Danvers' , ('555-1234','work')::phone_type ) ;