Re: How to use createdb command with newly created user? - Mailing list pgsql-general

From Tom Lane
Subject Re: How to use createdb command with newly created user?
Date
Msg-id 987119.1719169237@sss.pgh.pa.us
Whole thread Raw
In response to Re: How to use createdb command with newly created user?  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Sun, Jun 23, 2024, 11:43 毛毛 <krave@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



pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: How to use createdb command with newly created user?
Next
From: 毛毛
Date:
Subject: Re:Re: How to use createdb command with newly created user?