Re: createuser patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: createuser patch
Date: 2005-08-14 19:29:21
Message-ID: 2891.1124047761@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> 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.

Since it is called createuser, and not creategroup or createrole, I
don't see a big problem with making it default to LOGIN and INHERIT
true rather than prompting for them. I'll make it do that unless there
are objections.

> 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.

It's really hard to believe that anyone is using -i for SYSID in
scripts, so let's just change it.

regards, tom lane

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-08-14 20:17:32 Re: createuser patch
Previous Message Tom Lane 2005-08-14 18:52:24 Re: psql tab-complete and backslash patch