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. ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster