From 2c7de17b075baf7be270acf4d541bd4b17047e4c Mon Sep 17 00:00:00 2001 From: "Vadim B. Mikheev" Date: Mon, 16 Oct 2000 14:52:28 +0000 Subject: New file naming. Database OID is used as "tablespace" id and relation OID is used as file node on creation but may be changed later if required. Regression Tests Approved (c) -:))) --- src/backend/utils/init/postinit.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/backend/utils/init/postinit.c') diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index cc3a3825c40..cee8dfaac90 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.67 2000/10/02 19:42:54 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.68 2000/10/16 14:52:15 vadim Exp $ * * *------------------------------------------------------------------------- @@ -21,6 +21,10 @@ #include #include +#ifndef OLD_FILE_NAMING +#include "catalog/catalog.h" +#endif + #include "access/heapam.h" #include "catalog/catname.h" #include "catalog/pg_database.h" @@ -242,7 +246,12 @@ InitPostgres(const char *dbname, const char *username) */ if (bootstrap) { + MyDatabaseId = TemplateDbOid; +#ifdef OLD_FILE_NAMING SetDatabasePath(ExpandDatabasePath(dbname)); +#else + SetDatabasePath(GetDatabasePath(MyDatabaseId)); +#endif LockDisable(true); } else @@ -276,9 +285,13 @@ InitPostgres(const char *dbname, const char *username) "Database \"%s\" does not exist in the system catalog.", dbname); +#ifdef OLD_FILE_NAMING fullpath = ExpandDatabasePath(datpath); if (!fullpath) elog(FATAL, "Database path could not be resolved."); +#else + fullpath = GetDatabasePath(MyDatabaseId); +#endif /* Verify the database path */ -- cgit v1.2.3