Re: [PATCH] initdb: Treat empty -U argument as unset username
От | Jianghua Yang |
---|---|
Тема | Re: [PATCH] initdb: Treat empty -U argument as unset username |
Дата | |
Msg-id | CAAZLFmSKrcovMSauueWg=8VdZN-fHPH2ZengZRKA8AfgST6o6w@mail.gmail.com обсуждение исходный текст |
Ответ на | [PATCH] initdb: Treat empty -U argument as unset username (Jianghua Yang <yjhjstz@gmail.com>) |
Ответы |
Re: [PATCH] initdb: Treat empty -U argument as unset username
|
Список | pgsql-hackers |
git show 8e673801262c66af4a54837f63ff596407835c20
effective_user = get_id();
- if (strlen(username) == 0)
+ if (!username)
username = effective_user;
The check was changed from
strlen(username) == 0
to !username
, but this inadvertently stopped handling the empty-string case. This patch restores the original intent and makes the behavior consistent.David G. Johnston <david.g.johnston@gmail.com> 于2025年7月1日周二 20:12写道:
On Tue, Jul 1, 2025 at 7:56 PM Jianghua Yang <yjhjstz@gmail.com> wrote:Let me know if this approach seems reasonable or if you’d prefer we explicitly reject empty usernames with an error instead.I'd rather we reject the ambiguous input.David J.
В списке pgsql-hackers по дате отправления: