Need to rename function parameters, so that their names and table fields names are unmatched.
I don't really see a way to make the error any more obvious in the current pl/pgsql implementation, unfortunately.
-Neil
---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match