3

When I try to call pg_ctl with init[db] the option for setting the encoding is not recognized:

pg_ctl init -D=D:\testdata -E=UTF8 -U=postgres
pg_ctl: illegal option -- E

Has this changed? I used latest PostgreSQL 9.6 (zip download, x64). When I don't use the -E switch everything works but the database cluster is initialized with the wrong encoding.

0

1 Answer 1

7

pg_ctl does not have an option -E. If you want to run initdb through pg_ctl, you need to pass the initdb options using -o e.g. pg_ctl initdb -D ... -o "-E=UTF8"

But it's a lot easier to call initdb directly:

initdb -D=D:\testdata -E=UTF8 -U=postgres
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.