简体   繁体   中英

postgresql initdb.exe option flags not working in command line

in cmd.exe command line i go to the directory where there's initdb.exe and then i run :

initdb.exe -D "C:/data/" -U postgres -E UTF8

then the database is created with this message (in french, but i translated it in english for here) :

The files belonging to this database system will be owned by user "MyComputerUserName".
This user must also own the server process.

The database cluster will be initialized with locale "French_France.1252".
The default text search configuration will be set to "french".

My problem is that the command line flag for the user is not set to postgres and i get a 1252 Encoding instead of utf8 . But for a strange reason, the directoty flag work well and the data directory is created.

i tried to launch cmd.exe either with or without admin rights, but i get the same problem.

i use the version postgresql-13.1-1-windows-x64-binaries

any ideas on why the command line not working correctly? (´・ω・`)?

Thanks for your help.

There is nothing wrong here (or at least, no evidence of it). -U controls the name of the boot-strap superuser within PostgreSQL, while the message tells you the name of the OS user who will own the files. It is not a contradiction for those to be different.

UTF8 is an encoding, while "French_France.1252" is a locale. Again, it is not a contradiction for those to be different. Indeed they have to be different, as there is no locale named 'UTF8'.

If you start up the database, I think you will find that the superuser's name is postgres the encoding is UTF8.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM