2
0

user.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. #include "catalog/objectaddress.h"
  14. #include "libpq/crypt.h"
  15. #include "nodes/parsenodes.h"
  16. #include "parser/parse_node.h"
  17. /* GUC. Is actually of type PasswordType. */
  18. extern PGDLLIMPORT int Password_encryption;
  19. /* Hook to check passwords in CreateRole() and AlterRole() */
  20. typedef void (*check_password_hook_type) (const char *username, const char *shadow_pass, PasswordType password_type, Datum validuntil_time, bool validuntil_null);
  21. extern PGDLLIMPORT check_password_hook_type check_password_hook;
  22. extern Oid CreateRole(ParseState *pstate, CreateRoleStmt *stmt);
  23. extern Oid AlterRole(ParseState *pstate, AlterRoleStmt *stmt);
  24. extern Oid AlterRoleSet(AlterRoleSetStmt *stmt);
  25. extern void DropRole(DropRoleStmt *stmt);
  26. extern void GrantRole(GrantRoleStmt *stmt);
  27. extern ObjectAddress RenameRole(const char *oldname, const char *newname);
  28. extern void DropOwnedObjects(DropOwnedStmt *stmt);
  29. extern void ReassignOwnedObjects(ReassignOwnedStmt *stmt);
  30. extern List *roleSpecsToIds(List *memberNames);
  31. #endif /* USER_H */