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 "nodes/parsenodes.h"
16 
17 
18 /* Hook to check passwords in CreateRole() and AlterRole() */
19 #define PASSWORD_TYPE_PLAINTEXT 0
20 #define PASSWORD_TYPE_MD5 1
21 
22 typedef void (*check_password_hook_type) (const char *username, const char *password, int password_type, Datum validuntil_time, bool validuntil_null);
23 
25 
26 extern Oid CreateRole(CreateRoleStmt *stmt);
27 extern Oid AlterRole(AlterRoleStmt *stmt);
28 extern Oid AlterRoleSet(AlterRoleSetStmt *stmt);
29 extern void DropRole(DropRoleStmt *stmt);
30 extern void GrantRole(GrantRoleStmt *stmt);
31 extern ObjectAddress RenameRole(const char *oldname, const char *newname);
32 extern void DropOwnedObjects(DropOwnedStmt *stmt);
33 extern void ReassignOwnedObjects(ReassignOwnedStmt *stmt);
34 extern List *roleSpecsToIds(List *memberNames);
35 
36 #endif /* USER_H */
void DropOwnedObjects(DropOwnedStmt *stmt)
Definition: user.c:1316
unsigned int Oid
Definition: postgres_ext.h:31
void DropRole(DropRoleStmt *stmt)
Definition: user.c:947
#define PGDLLIMPORT
Definition: c.h:1043
Oid AlterRole(AlterRoleStmt *stmt)
Definition: user.c:482
List * roleSpecsToIds(List *memberNames)
Definition: user.c:1379
Oid AlterRoleSet(AlterRoleSetStmt *stmt)
Definition: user.c:867
void(* check_password_hook_type)(const char *username, const char *password, int password_type, Datum validuntil_time, bool validuntil_null)
Definition: user.h:22
uintptr_t Datum
Definition: postgres.h:374
void GrantRole(GrantRoleStmt *stmt)
Definition: user.c:1257
static char * username
Definition: initdb.c:134
ObjectAddress RenameRole(const char *oldname, const char *newname)
Definition: user.c:1124
void ReassignOwnedObjects(ReassignOwnedStmt *stmt)
Definition: user.c:1342
Definition: pg_list.h:45
PGDLLIMPORT check_password_hook_type check_password_hook
Definition: user.c:50
Oid CreateRole(CreateRoleStmt *stmt)
Definition: user.c:72