Re: troubles with initdb

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: troubles with initdb
Дата
Msg-id 4DE5A365.2090705@postnewspapers.com.au
обсуждение исходный текст
Ответ на troubles with initdb  (jlhgis <julia.harrell@gmail.com>)
Ответы Re: troubles with initdb  (jlhgis <julia.harrell@gmail.com>)
Список pgsql-general
On 31/05/2011 11:16 PM, jlhgis wrote:

> initdb –A md5  –D E:\Spatial_DB_Files\PostgreSQL_Test\8.3\data  -E
> UTF8  –-locale=C  -X F:\pgsql_test_logs  –U pgsql_test_su  –W

Aaaah... your typeface just gave me a clue. It's impossible for me to
tell if the issue above is just your mail client being "helpful" or if
it was present in the original command line, but look at the hyphens
before "locale=C".

I bet you wrote your original command line in a word processor like MS
Word, or copied and pasted it via there at some point. Maybe even
Outlook does it. Either way, that program was "helping" you. It's
converted your hyphens into proper long dashes. See how the first one is
a long dash (en dash, unicode 0x2013,
http://www.fileformat.info/info/unicode/char/2013/index.htm) and the
second is a minus sign (unicode 0x002d,
http://www.fileformat.info/info/unicode/char/002d/index.htm) ?

Unfortunately, the command line processor has no idea what unicode
0x2013 means, so it doesn't know how to process the arguments and fails.

The reason it fails on the SECOND argument is that initdb accepts the
datadir as the first argument, so it thinks you're specifying the
datadir "–A" then wonders what the rest of those non-option arguments
are for.

If I hand-write your command line then it works on my Windows test
machine, adjusted for paths. If I copy and paste it, it fails because of
the converted dashes.

--
Craig Ringer

Tech-related writing at http://soapyfrogs.blogspot.com/

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

Предыдущее
От: Brendan Jurd
Дата:
Сообщение: search_path versus dynamic CREATE SCHEMA
Следующее
От: Tom Lane
Дата:
Сообщение: Re: search_path versus dynamic CREATE SCHEMA