- update postgres function to modern style plpgsql definitions, avoid backslash escaping
- add missing function_args
- add missing function_args