> Always close your cursors. > Thanks. In my real example I had multiple return points and did not close the cursor before each one. ---------------------------(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