1 /*------------------------------------------------------------------------- 2 * 3 * user.h 4 * Commands for manipulating roles (formerly called users). 5 * 6 * 7 * src/include/commands/user.h 8 * 9 *------------------------------------------------------------------------- 10 */ 11 #ifndef USER_H 12 #define USER_H 13 14 #include "catalog/objectaddress.h" 15 #include "libpq/crypt.h" 16 #include "nodes/parsenodes.h" 17 #include "parser/parse_node.h" 18 19 /* GUC. Is actually of type PasswordType. */ 20 extern int Password_encryption; 21 22 /* Hook to check passwords in CreateRole() and AlterRole() */ 23 typedef void (*check_password_hook_type) (const char *username, const char *shadow_pass, PasswordType password_type, Datum validuntil_time, bool validuntil_null); 24 25 extern PGDLLIMPORT check_password_hook_type check_password_hook; 26 27 extern Oid CreateRole(ParseState *pstate, CreateRoleStmt *stmt); 28 extern Oid AlterRole(AlterRoleStmt *stmt); 29 extern Oid AlterRoleSet(AlterRoleSetStmt *stmt); 30 extern void DropRole(DropRoleStmt *stmt); 31 extern void GrantRole(GrantRoleStmt *stmt); 32 extern ObjectAddress RenameRole(const char *oldname, const char *newname); 33 extern void DropOwnedObjects(DropOwnedStmt *stmt); 34 extern void ReassignOwnedObjects(ReassignOwnedStmt *stmt); 35 extern List *roleSpecsToIds(List *memberNames); 36 37 #endif /* USER_H */ 38