Re: Additional role attributes && superuser review

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, David Steele <david(at)pgmasters(dot)net>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Adam Brightwell <adam(dot)brightwell(at)crunchydatasolutions(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Additional role attributes && superuser review
Date: 2015-12-29 14:55:41
Message-ID: 20151229145541.GR3685@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Amit,

* Amit Langote (Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp) wrote:
> On 2015/12/23 7:23, Stephen Frost wrote:
> > Updated patch attached. I'll give it another good look and then commit
> > it, barring objections.
>
> Just a minor nitpick about a code comment -
>
> /*
> + * Check that the user is not trying to create a role in the reserved
> + * "pg_" namespace.
> + */
> + if (IsReservedName(stmt->role))
>
> The wording may be slightly confusing, especially saying "... in ...
> namespace". ISTM, "namespace" is fairly extensively used around the code
> to mean something like "a schema's namespace".
>
> Could perhaps be reworded as:
>
> /*
> + * Check that the user is not trying to create a role with reserved
> + * name, ie, one starting with "pg_".
>
> If OK, there seems to be one more place further down in the patch with
> similar wording.

I could go either way on that, really. I don't find namespace to be
confusing when used in that way, but I'll change it since others do.

Thanks!

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-12-29 15:15:35 Re: pg_controldata/pg_resetxlog "Latest checkpoint's NextXID" format
Previous Message José Luis Tallón 2015-12-29 14:17:44 Re: pg_controldata/pg_resetxlog "Latest checkpoint's NextXID" format