This is the problem:
> ... t2.idr(p1, p4, p6, p7, p9, 'HLA-DRB5*0101')>2;
What is that t2.idr ? Based on the syntax postgres must look for a
function (because of the parentheses), and it thinks t2 is the schema
where it must look for it.
Cheers,
Csaba.