Re: display and expression of the home directory in Win32

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Hiroshi Saito" <saito(at)inetrt(dot)skcapi(dot)co(dot)jp>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: display and expression of the home directory in Win32
Date: 2006-01-06 16:07:40
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE92E97C@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

> I receive an inquiry from a user frequently. Where is it
> about a home directory in a place? Then, In offer of the
> initial state of Windows, the place is hidden and is not
> visible to a user. I considered what can be offered this way
> and that. Then, using pg_config thinks that it is good.
>
> This patch show a user a clear place. Please take this into
> consideration.
>
> F:\postgresql-8.1.2stable\src\bin\pg_config\Release>pg_config.exe
> BINDIR = F:/postgresql-8.1.2stable/src/bin/pg_config/Release
> DOCDIR =
> INCLUDEDIR =
> PKGINCLUDEDIR =
> INCLUDEDIR-SERVER =
> LIBDIR =
> PKGLIBDIR =
> LOCALEDIR =
> MANDIR =
> SHAREDIR =
> SYSCONFDIR =
> PGXS = /pgxs/src/makefiles/pgxs.mk
> HOMEDIR = "C:/Documents and Settings/saito/Application
> Data/postgresql"
> VERSION = PostgreSQL 8.1.1

HOMEDIR is a very bad name for this variable, since it's *not* the home
directory. It could easily be confused. If we put it in, I definitly
think it should be called something else.. (USERCONFDIR based on that we
have SYSCONFDIR, perhaps?). Also, there is no reason not to include it
on Unix as well - it would actrually be much better to do that, in case
someone wants to write a script that relies on it.

I'm also not sure this really buys us buch. There is already an
environment variable that points to this (unless you've applied some
very unusual modifications to your windows installation, in which case
you probably know where to be looking anyway), and that is:

%APPDATA%\postgresql

> dir "C:/Documents and Settings/saito/Application Data/postgresql"

This would then be:
dir "%APPDATA%\postgresql"

which is actually much easier to use than getting it from pg_config,
since you can use the environment variable in any command you want.

//Magnus

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Marko Kreen 2006-01-06 17:11:27 Re: [HACKERS] Inconsistent syntax in GRANT
Previous Message Bruce Momjian 2006-01-06 15:20:15 Re: [HACKERS] Inconsistent syntax in GRANT