This work for me
Create Type info_typ_ AS (
category integer ,
title text ,
actor text ,
price double precision );
Create Table Products_typobj (
prod_id integer,
info info_typ_,
primary key(prod_id)
);
I removed line with references
, so using type
works.
SQL Fiddle DEMO
If you need foreign key, try below code:
Create Type info_typ_ AS (
category integer ,
title text ,
actor text ,
price double precision );
Create Table Categories (
Category int,
primary key(Category)
);
Create Table Products_typobj (
prod_id integer,
info info_typ_,
Category int references Categories(Category),
primary key(prod_id),
FOREIGN KEY (Category) REFERENCES Categories (Category)
);