From: | Christopher Browne <cbbrowne(at)gmail(dot)com> |
---|---|
To: | Sameer Thakur <samthakur74(at)gmail(dot)com> |
Cc: | PostgreSQL Mailing Lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Extra functionality to createuser |
Date: | 2013-11-14 21:35:57 |
Message-ID: | CAFNqd5XwvmWZbqEFy=GfsSnDjaxry+9OGrtXHzv4k9KhEmyqaA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Nov 14, 2013 at 5:41 AM, Sameer Thakur <samthakur74(at)gmail(dot)com> wrote:
> So i think -g option is failing
Right you are.
I was missing a "g:" in the getopt_long() call.
Attached is a revised patch that handles that.
And it behaves better:
postgres(at)cbbrowne ~/p/s/b/scripts> ./createuser -g purge_role -U
postgres newuser4
postgres(at)cbbrowne ~/p/s/b/scripts> pg_dumpall -g | grep newuser4
CREATE ROLE newuser4;
ALTER ROLE newuser4 WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB
LOGIN NOREPLICATION;
GRANT purge_role TO newuser4 GRANTED BY postgres;
--
When confronted by a difficult problem, solve it by reducing it to the
question, "How would the Lone Ranger handle this?"
Attachment | Content-Type | Size |
---|---|---|
createuser.diff | text/plain | 2.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2013-11-14 21:43:54 | "union all" query consumes all memory |
Previous Message | Pavel Stehule | 2013-11-14 21:30:06 | Re: Assertions in PL/PgSQL |