Re: disable prompting by default in createuser

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: disable prompting by default in createuser
Дата
Msg-id 1328120009.28270.1.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на Re: disable prompting by default in createuser  (Josh Kupershmidt <schmiddy@gmail.com>)
Ответы Re: disable prompting by default in createuser  (Josh Kupershmidt <schmiddy@gmail.com>)
Список pgsql-hackers
On sön, 2012-01-15 at 18:14 -0500, Josh Kupershmidt wrote:
> I see this patch includes a small change to dropuser, to make the
> 'username' argument mandatory if --interactive is not set, for
> symmetry with createuser's new behavior. That's dandy, though IMO we
> shouldn't have "-i" be shorthand for "--interactive" with dropuser,
> and something different with createuser (i.e. we should just get rid
> of the "i" alias for dropuser).

Well, all the other tools also support -i for prompting.  I'd rather get
rid of -i for --inherit, but I fear that will break things as well.  I'm
not sure what to do.
> 
> Another little inconsistency I see with the behavior when no username
> to create or drop is given:
> 
> $  createuser
> createuser: creation of new role failed: ERROR:  role "josh" already
> exists
> $ dropuser
> dropuser: missing required argument role name
> Try "dropuser --help" for more information.
> 
> i.e. createuser tries taking either $PGUSER or the current username as
> a default user to create, while dropuser just bails out. Personally, I
> prefer just bailing out if no create/drop user is specified, but
> either way I think they should be consistent.

That is intentional long-standing behavior.  createdb/dropdb work the
same way.




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: some longer, larger pgbench tests with various performance-related patches
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Fix float8 parsing of denormal values (on some platforms?)