1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

First batch of object rename commands.

This commit is contained in:
Peter Eisentraut
2003-06-27 14:45:32 +00:00
parent 5bac7d11dd
commit b256f24264
60 changed files with 2018 additions and 442 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/misc.c,v 1.28 2003/02/13 05:24:02 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/misc.c,v 1.29 2003/06/27 14:45:30 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -54,7 +54,6 @@ current_database(PG_FUNCTION_ARGS)
db = (Name) palloc(NAMEDATALEN);
namestrcpy(db, DatabaseName);
namestrcpy(db, get_database_name(MyDatabaseId));
PG_RETURN_NAME(db);
}

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.71 2003/05/28 18:19:09 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.72 2003/06/27 14:45:30 petere Exp $
*
* NOTES
* Globals used all over the place should be declared here and not
@@ -52,9 +52,7 @@ char pg_pathname[MAXPGPATH]; /* full path to postgres
BackendId MyBackendId;
char *DatabaseName = NULL;
char *DatabasePath = NULL;
Oid MyDatabaseId = InvalidOid;
/* these are initialized for the bootstrap/standalone case: */

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.102 2003/04/04 20:42:12 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.103 2003/06/27 14:45:30 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -105,22 +105,6 @@ SetDatabasePath(const char *path)
}
}
void
SetDatabaseName(const char *name)
{
if (DatabaseName)
{
free(DatabaseName);
DatabaseName = NULL;
}
/* use strdup since this is done before memory contexts are set up */
if (name)
{
DatabaseName = strdup(name);
AssertState(DatabaseName);
}
}
/*
* Set data directory, but make sure it's an absolute path. Use this,
* never set DataDir directly.

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.121 2003/05/14 03:26:02 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.122 2003/06/27 14:45:30 petere Exp $
*
*
*-------------------------------------------------------------------------
@@ -228,13 +228,11 @@ InitPostgres(const char *dbname, const char *username)
bool bootstrap = IsBootstrapProcessingMode();
/*
* Set up the global variables holding database name, id, and path.
* Set up the global variables holding database id and path.
*
* We take a shortcut in the bootstrap case, otherwise we have to look up
* the db name in pg_database.
*/
SetDatabaseName(dbname);
if (bootstrap)
{
MyDatabaseId = TemplateDbOid;

View File

@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/misc/superuser.c,v 1.25 2002/12/05 04:04:47 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/misc/superuser.c,v 1.26 2003/06/27 14:45:31 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -58,18 +58,3 @@ superuser_arg(AclId userid)
}
return result;
}
/*
* The Postgres user running this command is the owner of the specified
* database.
*/
bool
is_dbadmin(Oid dbid)
{
AclId dba;
dba = get_database_owner(dbid);
return (GetUserId() == dba);
}