[postgresql] changed variable and function names and added schema_name parameter to some functions