Re: Idea: cross-check versions during initdb
От | Peter Eisentraut |
---|---|
Тема | Re: Idea: cross-check versions during initdb |
Дата | |
Msg-id | Pine.LNX.4.21.0010280027130.838-100000@peter.localdomain обсуждение исходный текст |
Ответ на | Re: Idea: cross-check versions during initdb (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
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 peter_e@gmx.net http://yi.org/peter-e/
В списке pgsql-hackers по дате отправления: