pg_ctl -D canonicalization

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема pg_ctl -D canonicalization
Дата
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE475FD3@algol.sollentuna.se
обсуждение исходный текст
Ответы Re: pg_ctl -D canonicalization  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
It seems pg_ctl calls canonicalize_path() only on the path as being used
to access for example the pid file, and not the path that is sent along
to the postmaster.
Specifically, this causes failure on win32 when a path is passed with a
trailing backslash, when it's inside quotes such as:
pg_ctl start -D "c:\program fiels\postgresql\data\"

The quotes are of course necessary since there are spaces in the
filename. In my specific case the trailing backslash is automatically
added by windows installer. but other cases when the backslash is added
can easily be seen...

Attached patch makes pg_ctl call canonicalize_path() on the path as
passed on the commandline as well.

I have only tested this on win32, where it appears to work fine. I think
it would be good on other platsforms as well which is why I didn't
#ifdef it. If not, then please add #ifdefs.


//Magnus

Вложения

В списке pgsql-patches по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: initdb conf-files linebreaks
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] strange result from contrib/seg regression on windows