How can I create a constraint on a sub-field of composite type?
Pseudocode
create type axis(
major_axis float,
minor_axis float,
angle float constraint angle_constraint check(angle between -90 and 90)
);
create table sample(
axis1 axis,
axis2 axis
);
Is this possible in PostgreSQL 9.2? It seems to be not possible in 9.1 as mentioned here.