PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
user.h
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
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 
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 */
void DropOwnedObjects(DropOwnedStmt *stmt)
Definition: user.c:1321
Oid CreateRole(ParseState *pstate, CreateRoleStmt *stmt)
Definition: user.c:72
unsigned int Oid
Definition: postgres_ext.h:31
void DropRole(DropRoleStmt *stmt)
Definition: user.c:954
#define PGDLLIMPORT
Definition: c.h:1063
Oid AlterRole(AlterRoleStmt *stmt)
Definition: user.c:493
List * roleSpecsToIds(List *memberNames)
Definition: user.c:1384
Oid AlterRoleSet(AlterRoleSetStmt *stmt)
Definition: user.c:874
uintptr_t Datum
Definition: postgres.h:372
void GrantRole(GrantRoleStmt *stmt)
Definition: user.c:1262
PasswordType
Definition: crypt.h:24
static char * username
Definition: initdb.c:131
int Password_encryption
Definition: user.c:47
ObjectAddress RenameRole(const char *oldname, const char *newname)
Definition: user.c:1131
void ReassignOwnedObjects(ReassignOwnedStmt *stmt)
Definition: user.c:1347
Definition: pg_list.h:45
PGDLLIMPORT check_password_hook_type check_password_hook
Definition: user.c:50
void(* check_password_hook_type)(const char *username, const char *shadow_pass, PasswordType password_type, Datum validuntil_time, bool validuntil_null)
Definition: user.h:23