]> granicus.if.org Git - postgresql/blob - src/include/commands/user.h
1f0cfcc86f9512c33d9b30a7117df9a5e67b5b91
[postgresql] / src / include / commands / user.h
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 #include "parser/parse_node.h"
17
18
19 /* Hook to check passwords in CreateRole() and AlterRole() */
20 #define PASSWORD_TYPE_PLAINTEXT         0
21 #define PASSWORD_TYPE_MD5                       1
22
23 typedef void (*check_password_hook_type) (const char *username, const char *password, int password_type, Datum validuntil_time, bool validuntil_null);
24
25 extern PGDLLIMPORT check_password_hook_type check_password_hook;
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 */