diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2000-01-14 22:11:38 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2000-01-14 22:11:38 +0000 |
commit | 4ceb2d0cb619bba2ecbf5d72a10c8fa7ba321366 (patch) | |
tree | fedda3351400f98ed990320516f0eed80d6c1b73 /src/include/nodes/parsenodes.h | |
parent | 2af360ed1c5036b8d488cdb6dc94f96608375769 (diff) |
* User management commands no longer user pg_exec_query_dest -> more robust
* Let unprivileged users change their own passwords.
* The password is now an Sconst in the parser, which better reflects its text datatype and also
forces users to quote them.
* If your password is NULL you won't be written to the password file, meaning you can't connect
until you have a password set up (if you use password authentication).
* When you drop a user that owns a database you get an error. The database is not gone.
Diffstat (limited to 'src/include/nodes/parsenodes.h')
-rw-r--r-- | src/include/nodes/parsenodes.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 714f06d5db0..0b2a2a0e93a 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: parsenodes.h,v 1.92 1999/12/16 17:24:19 momjian Exp $ + * $Id: parsenodes.h,v 1.93 2000/01/14 22:11:38 petere Exp $ * *------------------------------------------------------------------------- */ @@ -270,18 +270,26 @@ typedef struct CreateUserStmt char *user; /* PostgreSQL user login */ char *password; /* PostgreSQL user password */ int sysid; /* PgSQL system id (-1 if don't care) */ - bool *createdb; /* Can the user create databases? */ - bool *createuser; /* Can this user create users? */ + bool createdb; /* Can the user create databases? */ + bool createuser; /* Can this user create users? */ List *groupElts; /* The groups the user is a member of */ char *validUntil; /* The time the login is valid until */ } CreateUserStmt; -typedef CreateUserStmt AlterUserStmt; +typedef struct AlterUserStmt +{ + NodeTag type; + char *user; /* PostgreSQL user login */ + char *password; /* PostgreSQL user password */ + int createdb; /* Can the user create databases? */ + int createuser; /* Can this user create users? */ + char *validUntil; /* The time the login is valid until */ +} AlterUserStmt; typedef struct DropUserStmt { NodeTag type; - char *user; /* PostgreSQL user login */ + List *users; /* List of users to remove */ } DropUserStmt; @@ -301,7 +309,7 @@ typedef struct AlterGroupStmt { NodeTag type; char *name; /* name of group to alter */ - int action; /* +1 = add, -1 = drop, 0 = other (HACK!) */ + int action; /* +1 = add, -1 = drop user */ int sysid; /* sysid change */ List *listUsers; /* list of users to add/drop */ } AlterGroupStmt; |