minor fixes in PLSQL/PLpgSQL scripts