Tom Lane writes:
> But it's still dependent on the user's PATH to point to the right
> executables, no?
This is what's puzzling me. There's code in there that tries to locate
initdb and uses the executables and bki files (7.0 only) from the same
tree. Evidently this code does not always work right, but that's what
needs to be fixed.
CMDNAME=`basename $0`
...
#
# Find out where we're located
#
if echo "$0" | grep '/' > /dev/null 2>&1
then
# explicit dir name given
PGPATH=`echo $0 | sed 's,/[^/]*$,,'` # (dirname command is not portable)
else
# look for it in PATH ('which' command is not portable)
for dir in `echo "$PATH" | sed 's/:/ /g'`
do
# empty entry in path means current dir
[ -z "$dir" ] && dir='.'
if [ -f "$dir/$CMDNAME" ]
then
PGPATH="$dir"
break
fi
done
fi
--
Peter Eisentraut [EMAIL PROTECTED] http://yi.org/peter-e/
- [HACKERS] Idea: cross-check versions during initdb Tom Lane
- Re: [HACKERS] Idea: cross-check versions during init... Larry Rosenman
- Re: [HACKERS] Idea: cross-check versions during ... Peter Eisentraut
- Re: [HACKERS] Idea: cross-check versions dur... Tom Lane
- Re: [HACKERS] Idea: cross-check versions... Bruce Momjian
- Re: [HACKERS] Idea: cross-check versions during ... Peter Eisentraut
- Re: [HACKERS] Idea: cross-check versions dur... Tom Lane
- Re: [HACKERS] Idea: cross-check versions... Peter Eisentraut
- Re: [HACKERS] Idea: cross-check ver... Tom Lane
- Re: [HACKERS] Idea: cross-check... Peter Eisentraut
- Re: [HACKERS] Idea: cross-c... Tom Lane
- Re: [HACKERS] Idea: cross-check versions during init... Bruce Momjian
