Re: troubles with initdb

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: jlhgis <julia(dot)harrell(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: troubles with initdb
Date: 2011-06-01 02:26:45
Message-ID: 4DE5A365.2090705@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-06-01 03:08:55 Re: search_path versus dynamic CREATE SCHEMA
Previous Message Brendan Jurd 2011-06-01 02:25:02 search_path versus dynamic CREATE SCHEMA