diff options
| author | Bruce Momjian <bruce@momjian.us> | 1999-09-27 16:44:56 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 1999-09-27 16:44:56 +0000 |
| commit | 74a263ed34d9beb0df509fccb444291b9a14e462 (patch) | |
| tree | a9660baea2521a471d7379395f2862a09fdb2e17 /src/backend/commands/user.c | |
| parent | 30659d43eb73272e20f2eb1d785a07ba3b553ed8 (diff) | |
| download | postgresql-74a263ed34d9beb0df509fccb444291b9a14e462.tar.gz | |
Fix to give super user and createdb user proper update catalog rights.
Diffstat (limited to 'src/backend/commands/user.c')
| -rw-r--r-- | src/backend/commands/user.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index c05b6da585..76b028f7ee 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: user.c,v 1.34 1999/09/18 19:06:41 tgl Exp $ + * $Id: user.c,v 1.35 1999/09/27 16:44:50 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -172,12 +172,14 @@ DefineUser(CreateUserStmt *stmt, CommandDest dest) snprintf(sql, SQL_LENGTH, "insert into %s (usename,usesysid,usecreatedb,usetrace," "usesuper,usecatupd,passwd,valuntil) " - "values('%s',%d,'%c','f','%c','f',%s%s%s,%s%s%s)", + "values('%s',%d,'%c','f','%c','%c',%s%s%s,%s%s%s)", ShadowRelationName, stmt->user, max_id + 1, (stmt->createdb && *stmt->createdb) ? 't' : 'f', (stmt->createuser && *stmt->createuser) ? 't' : 'f', + ((stmt->createdb && *stmt->createdb) || + (stmt->createuser && *stmt->createuser)) ? 't' : 'f', havepassword ? "'" : "", havepassword ? stmt->password : "NULL", havepassword ? "'" : "", |
