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. */
20extern int Password_encryption;
21
22/* Hook to check passwords in CreateRole() and AlterRole() */
23typedef void (*check_password_hook_type) (const char *username, const char *shadow_pass, PasswordType password_type, Datum validuntil_time, bool validuntil_null);
24
25extern PGDLLIMPORT check_password_hook_type check_password_hook;
26
27extern Oid CreateRole(ParseState *pstate, CreateRoleStmt *stmt);
28extern Oid AlterRole(AlterRoleStmt *stmt);
29extern Oid AlterRoleSet(AlterRoleSetStmt *stmt);
30extern void DropRole(DropRoleStmt *stmt);
31extern void GrantRole(GrantRoleStmt *stmt);
32extern ObjectAddress RenameRole(const char *oldname, const char *newname);
33extern void DropOwnedObjects(DropOwnedStmt *stmt);
34extern void ReassignOwnedObjects(ReassignOwnedStmt *stmt);
35extern List *roleSpecsToIds(List *memberNames);
36
37#endif /* USER_H */
38