Hello Tom, thank u for your fast reply! Now I understand that i can not split easily my scripts into logical units but what i not understand is the documention not correct or is my problem not similiar to the example in point 37.4.3 on http://www.postgresql.org/docs/7.4/static/plpgsql-declarations.html ? thank u for your help, thomas ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org