From: | "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: feature request: show pgsql version when running initdb |
Date: | 2003-09-26 07:19:07 |
Message-ID: | Pine.LNX.4.21.0309260805460.20483-100000@ponder.fairway2k.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 26 Sep 2003, Christopher Kings-Lynne wrote:
> > If you install many different versions in parallel, don't you give your
> > installation paths some meaning that contain the version number? In any
> > case, you can run initdb --version first if you're not sure about what is
> > where.
>
> Yes I do, but sometimes as different users you don't know what the path
> is. I guess I can just go --version.
Or just:
which initdb
which is a bit easier to interpret than:
echo $path
which is what you really want to know, i.e. what are the default paths applied
in the search for an executable invoked without an explicit path.
I think the problem here is the assumption that you don't need to explicitly
state the path to the executable when invoking a command from multiple
installations. If you've got specific requirements on which version to run
never just assume which one will be picked up, always take steps to verify
which one it is, explicitly state which one to use or accept that you may well
end up running the wrong and have to start again (if you're lucky enough to be
trying something that isn't going to permanently move you into a state where
you can't start again).
To take the normal sort of example in reverse:
I have a script for reading manuals, I call it rm, it can take some switches
lets say r and f, as well as the name of something to read about. I happen to
be sitting in / and I look and start wondering why there's a /sbin. So I think
I'll see if there's anything in the document store about it. So I type:
rm -rf sbin
(to do a recursive search of formated documents perhaps). I don't think about
it, verify it or anything. Why should I? It always just works. Unfortunately,
although I do know I'm doing this as root it doesn't occur to me there might be
another command called rm installed somewhere on the system that I might pick
up instead.
Moral of the story, if it's in your path first then it's the default and you
should therefore be happy with the results or be prepared to live with them,
otherwise make sure what you're running.
--
Nigel J. Andrews
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2003-09-26 07:48:54 | pg_get_triggerdef pretty printing |
Previous Message | Philip Yarra | 2003-09-26 06:59:52 | Re: feature request: show pgsql version when running initdb |