mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
Remove most compile-time options, add a few runtime options to make up for it.
In particular, no more compiled-in default for PGDATA or LIBDIR. Commands that need them need either invocation options or environment variables. PGPORT default is hardcoded as 5432, but overrideable with options or environment variables.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.2 1996/11/06 10:31:57 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.3 1996/11/14 10:24:41 bryanh Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -345,35 +345,3 @@ SetUserId()
|
||||
UserRelationName);
|
||||
UserId = (Oid) ((Form_pg_user) GETSTRUCT(userTup))->usesysid;
|
||||
}
|
||||
|
||||
/* ----------------
|
||||
* GetPGHome
|
||||
*
|
||||
* Get POSTGRESHOME from environment, or return default.
|
||||
* ----------------
|
||||
*/
|
||||
char *
|
||||
GetPGHome()
|
||||
{
|
||||
#ifdef USE_ENVIRONMENT
|
||||
char *h;
|
||||
|
||||
if ((h = getenv("POSTGRESHOME")) != (char *) NULL)
|
||||
return (h);
|
||||
#endif /* USE_ENVIRONMENT */
|
||||
return (POSTGRESDIR);
|
||||
|
||||
}
|
||||
|
||||
char *
|
||||
GetPGData()
|
||||
{
|
||||
#ifdef USE_ENVIRONMENT
|
||||
char *p;
|
||||
|
||||
if ((p = getenv("PGDATA")) != (char *) NULL) {
|
||||
return (p);
|
||||
}
|
||||
#endif /* USE_ENVIRONMENT */
|
||||
return (PGDATADIR);
|
||||
}
|
||||
|
Reference in New Issue
Block a user