1997-12-04 01:34:01 +01:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* user.h
|
2005-06-28 07:09:14 +02:00
|
|
|
* Commands for manipulating roles (formerly called users).
|
1997-12-04 01:34:01 +01:00
|
|
|
*
|
|
|
|
*
|
2010-09-20 22:08:53 +02:00
|
|
|
* src/include/commands/user.h
|
1997-12-04 01:34:01 +01:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef USER_H
|
|
|
|
#define USER_H
|
|
|
|
|
1999-07-14 03:20:30 +02:00
|
|
|
#include "nodes/parsenodes.h"
|
|
|
|
|
2002-04-04 06:25:54 +02:00
|
|
|
|
2009-11-18 22:57:56 +01:00
|
|
|
/* 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;
|
|
|
|
|
2013-05-29 22:58:43 +02:00
|
|
|
extern Oid CreateRole(CreateRoleStmt *stmt);
|
|
|
|
extern Oid AlterRole(AlterRoleStmt *stmt);
|
|
|
|
extern Oid AlterRoleSet(AlterRoleSetStmt *stmt);
|
2005-06-28 07:09:14 +02:00
|
|
|
extern void DropRole(DropRoleStmt *stmt);
|
|
|
|
extern void GrantRole(GrantRoleStmt *stmt);
|
2013-05-29 22:58:43 +02:00
|
|
|
extern Oid 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);
|
1999-12-16 18:24:19 +01:00
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* USER_H */
|