"David G. Johnston" <david.g.johns...@gmail.com> writes: > On Sun, Jun 23, 2024, 11:43 毛毛 <kr...@163.com> wrote: >> Then I run the following command on PowerShell on Windows 10: >> createdb -U Baba -W test_db >> But no mater how I tried, the password always failed.
> You named the user "baba" all lower-case but your createdb command uses > Baba and in the OS the case-folding of identifiers does not happen. Baba > != baba is your issue. FWIW, I think using -W in interactive commands is a bad habit that you should drop. Because it forces a password prompt, it easily confuses people into thinking that their problem is password-related whether it actually is or not. (I notice that with createdb, it actually seems to force *two* password prompts when there is something wrong. That's unlike what happens with psql; maybe we should try to improve that. But on the other hand, it's hard to get excited about putting work into improving a behavior that we deprecate using at all.) regards, tom lane