I want to add a field, default_party_id, to the users table, and
check to make sure that the referenced party actually belongs to the
user.
bf2=# alter table users add default_party_id int references parties
(party_id);
ALTER
bf2=# alter table users add constraint party_id_valid check
(user_id = (select user_id from parties where party_id =
default_party_id))
;
bf2-# bf2-# ERROR: ExecEvalExpr: unknown expression type 108
I'm not sure what to make of this error...