Search Postgresql Archives

Re: troubles with initdb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux