diff options
author | Peter Eisentraut | 2000-09-19 18:18:04 +0000 |
---|---|---|
committer | Peter Eisentraut | 2000-09-19 18:18:04 +0000 |
commit | 457ac0331cd3e28ecc5d783e7504645837c41a1d (patch) | |
tree | ba4676d77b28de759955919a8dc14303fb7330bc /src/include/miscadmin.h | |
parent | e9c3f0255fb54600e1c03533cc2e72d78928634d (diff) |
Implement differentiation between CURRENT_USER and SESSION_USER as per SQL.
There is still no effective difference but it will kick in once setuid
functions exist (not included here). Make old getpgusername() alias for
current_user.
Diffstat (limited to 'src/include/miscadmin.h')
-rw-r--r-- | src/include/miscadmin.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index 540b7266682..2132b3bb28e 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -12,7 +12,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: miscadmin.h,v 1.66 2000/09/06 19:54:52 petere Exp $ + * $Id: miscadmin.h,v 1.67 2000/09/19 18:17:58 petere Exp $ * * NOTES * some of the information in this file will be moved to @@ -128,10 +128,14 @@ extern char *ExpandDatabasePath(const char *path); extern void SetDatabaseName(const char *name); extern void SetDatabasePath(const char *path); -extern char *GetPgUserName(void); -extern Oid GetUserId(void); +extern char *GetUserName(Oid userid); + +extern Oid GetUserId(void); extern void SetUserId(Oid userid); -extern void SetUserIdFromUserName(const char *username); +extern Oid GetSessionUserId(void); +extern void SetSessionUserId(Oid userid); +extern void SetSessionUserIdFromUserName(const char *username); + extern int FindExec(char *full_path, const char *argv0, const char *binary_name); extern int CheckPathAccess(char *path, char *name, int open_mode); |