createuser patch

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема createuser patch
Дата
Msg-id 20050812163722.GA16834@alvh.no-ip.org
обсуждение исходный текст
Ответы Re: createuser patch  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Re: createuser patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: createuser patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
Hackers,

Here is a patch to createuser, to make it handle some of the options of
CREATE ROLE.

While developing it, I noticed it takes an annoying number of options,
or ask an annoying number of questions.  I thought about producing a
version called "createrole" which would have all the options and ask
about them if not supplied, but if called with the name "createuser" (a
symlink or hardlink) it would assume defaults for some of them, like
INHERIT and LOGIN.  However I don't see this pattern applied elsewhere
in our programs, so I'm not sure we want to establish this precedent.

Also, note that the "inherit" option uses "-y" as the short option,
because all the other good letters are taken.  In particular, -i is
taken by the now obsolete SYSID.  -i is accepted but silently ignored.
I actually wondered if mantaining backwards compatibility was so
important as in SQL -- if it's not, then we can get rid of -i as SYSID,
and use it for INHERIT.

Also, note that -a/-A ("adduser") is an undocumented alias for -s/-S,
just like CREATEUSER is an alias for SUPERUSER.

There are some options for CREATE ROLE which are not supported in
createuser, like IN ROLE, ROLE, ADMIN, VALID UNTIL.  The old one didn't
handle IN GROUP nor VALID UNTIL either, so I don't see this as a big
problem.

Comments?  After things have settled I'll generate the doc patch.

--
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
Management by consensus: I have decided; you concede.
(Leonard Liu)

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] data on devel code perf dip
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: createuser patch