postgresql/src/include/commands/user.h

37 lines
1.2 KiB
C
Raw Normal View History

/*-------------------------------------------------------------------------
*
* user.h
* Commands for manipulating roles (formerly called users).
*
*
2010-09-20 22:08:53 +02:00
* src/include/commands/user.h
*
*-------------------------------------------------------------------------
*/
#ifndef USER_H
#define USER_H
#include "catalog/objectaddress.h"
#include "nodes/parsenodes.h"
/* Hook to check passwords in CreateRole() and AlterRole() */
#define PASSWORD_TYPE_PLAINTEXT 0
#define PASSWORD_TYPE_MD5 1
typedef void (*check_password_hook_type) (const char *username, const char *password, int password_type, Datum validuntil_time, bool validuntil_null);
extern PGDLLIMPORT check_password_hook_type check_password_hook;
extern Oid CreateRole(CreateRoleStmt *stmt);
extern Oid AlterRole(AlterRoleStmt *stmt);
extern Oid AlterRoleSet(AlterRoleSetStmt *stmt);
extern void DropRole(DropRoleStmt *stmt);
extern void GrantRole(GrantRoleStmt *stmt);
extern ObjectAddress RenameRole(const char *oldname, const char *newname);
2006-10-04 02:30:14 +02:00
extern void DropOwnedObjects(DropOwnedStmt *stmt);
extern void ReassignOwnedObjects(ReassignOwnedStmt *stmt);
extern List *roleNamesToIds(List *memberNames);
#endif /* USER_H */