I think what you are looking for is the CHECK
constraint.
create table mydata(
cars char(4)CONSTRAINT limit_cars_to CHECK (cars in ('bmw', 'audi'))
);
insert into mydata values('bmw'); /*this insert works*/
insert into mydata values('xxx');/*this insert fails msg: ERROR: new row for relation "mydata" violates check constraint "limit_cars_to": insert into mydata values('xxx')
*/
I have tested this with PostgreSQL 8.3 ( as that is what is availabel on SQL Fiddle). Might just work with PostgreSQL 8.1. Give it a try.
Source: http://www.postgresql.org/docs/8.1/static/ddl-constraints.html