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:
@ -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))
|
||||
|
Reference in New Issue
Block a user