PostgreSQL Source Code  git master
Go to the documentation of this file.
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
14 #include "catalog/objectaddress.h"
15 #include "libpq/crypt.h"
16 #include "nodes/parsenodes.h"
17 #include "parser/parse_node.h"
18 #include "utils/guc.h"
20 /* GUCs */
21 extern PGDLLIMPORT int Password_encryption; /* values from enum PasswordType */
24 /* Hook to check passwords in CreateRole() and AlterRole() */
25 typedef void (*check_password_hook_type) (const char *username, const char *shadow_pass, PasswordType password_type, Datum validuntil_time, bool validuntil_null);
29 extern Oid CreateRole(ParseState *pstate, CreateRoleStmt *stmt);
30 extern Oid AlterRole(ParseState *pstate, AlterRoleStmt *stmt);
32 extern void DropRole(DropRoleStmt *stmt);
33 extern void GrantRole(ParseState *pstate, GrantRoleStmt *stmt);
34 extern ObjectAddress RenameRole(const char *oldname, const char *newname);
35 extern void DropOwnedObjects(DropOwnedStmt *stmt);
37 extern List *roleSpecsToIds(List *memberNames);
39 extern bool check_createrole_self_grant(char **newval, void **extra,
41 extern void assign_createrole_self_grant(const char *newval, void *extra);
43 #endif /* USER_H */
Definition: c.h:1321
Definition: crypt.h:28
#define newval
Definition: guc.h:108
#define stmt
Definition: indent_codes.h:59
static rewind_source * source
Definition: pg_rewind.c:87
const char * username
Definition: pgbench.c:306
uintptr_t Datum
Definition: postgres.h:64
unsigned int Oid
Definition: postgres_ext.h:31
Definition: pg_list.h:54
ObjectAddress RenameRole(const char *oldname, const char *newname)
Definition: user.c:1341
PGDLLIMPORT int Password_encryption
Definition: user.c:86
void ReassignOwnedObjects(ReassignOwnedStmt *stmt)
Definition: user.c:1618
Oid AlterRole(ParseState *pstate, AlterRoleStmt *stmt)
Definition: user.c:620
Oid AlterRoleSet(AlterRoleSetStmt *stmt)
Definition: user.c:1001
PGDLLIMPORT check_password_hook_type check_password_hook
Definition: user.c:92
bool check_createrole_self_grant(char **newval, void **extra, GucSource source)
Definition: user.c:2522
void assign_createrole_self_grant(const char *newval, void *extra)
Definition: user.c:2573
void(* check_password_hook_type)(const char *username, const char *shadow_pass, PasswordType password_type, Datum validuntil_time, bool validuntil_null)
Definition: user.h:25
void DropRole(DropRoleStmt *stmt)
Definition: user.c:1091
Oid CreateRole(ParseState *pstate, CreateRoleStmt *stmt)
Definition: user.c:133
PGDLLIMPORT char * createrole_self_grant
Definition: user.c:87
void GrantRole(ParseState *pstate, GrantRoleStmt *stmt)
Definition: user.c:1487
List * roleSpecsToIds(List *memberNames)
Definition: user.c:1659
void DropOwnedObjects(DropOwnedStmt *stmt)
Definition: user.c:1590