Since 3.3 you can use check constraints to enforce things, but I don't know what kind of performance impact that has.
Maybe you are thinking about foreign key constraints, which for backwards compatibility are off by default, unless you use a compile-time option to make then on by default.