1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-16 06:01:02 +03:00

More cleanup of userid to be AclId rather than Oid.

This commit is contained in:
Bruce Momjian
2002-12-05 04:04:51 +00:00
parent caaf941070
commit 7816c7cb94
17 changed files with 101 additions and 97 deletions

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.108 2002/12/02 05:20:47 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.109 2002/12/05 04:04:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -63,7 +63,7 @@ createdb(const CreatedbStmt *stmt)
char src_loc[MAXPGPATH];
char buf[2 * MAXPGPATH + 100];
Oid src_dboid;
int4 src_owner;
AclId src_owner;
int src_encoding;
bool src_istemplate;
Oid src_lastsysoid;
@ -76,7 +76,7 @@ createdb(const CreatedbStmt *stmt)
Datum new_record[Natts_pg_database];
char new_record_nulls[Natts_pg_database];
Oid dboid;
int32 datdba;
AclId datdba;
List *option;
DefElem *downer = NULL;
DefElem *dpath = NULL;
@ -157,7 +157,7 @@ createdb(const CreatedbStmt *stmt)
else
datdba = GetUserId();
if (datdba == (int32) GetUserId())
if (datdba == GetUserId())
{
/* creating database for self: can be superuser or createdb */
if (!superuser() && !have_createdb_privilege())
@ -670,7 +670,7 @@ have_createdb_privilege(void)
bool retval;
utup = SearchSysCache(SHADOWSYSID,
ObjectIdGetDatum(GetUserId()),
Int32GetDatum(GetUserId()),
0, 0, 0);
if (!HeapTupleIsValid(utup))