I have three tables: organization, organization_teams and org_users. Here organization_teams is inherited from orga
Completely agree with @Craig Ringer, we can't use foreign keys along with inheritance.
But if we are sure that we are going to insert correct data, and we want to use foreign key in org_users, we can do one thing.
We can create a child table of org_users say org_users_child (with no foreign key) as below
CREATE TABLE org_users_child () INHERITS (org_users);
Now we can insert data in this child table.
Now if we query over org_users table, we can find desired results.