pgsql: Reserve the "pg_" namespace for roles

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Reserve the "pg_" namespace for roles
Date: 2016-04-08 20:56:34
Message-ID: E1aodSE-0007Jp-22@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Reserve the "pg_" namespace for roles

This will prevent users from creating roles which begin with "pg_" and
will check for those roles before allowing an upgrade using pg_upgrade.

This will allow for default roles to be provided at initdb time.

Reviews by José Luis Tallón and Robert Haas

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/293007898d3fa5a815c1c5814df53627553f114d

Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml | 8 ++++--
src/backend/catalog/aclchk.c | 7 +++++
src/backend/catalog/catalog.c | 5 ++--
src/backend/commands/alter.c | 3 ++
src/backend/commands/foreigncmds.c | 13 +++++++++
src/backend/commands/policy.c | 5 ++++
src/backend/commands/schemacmds.c | 4 +++
src/backend/commands/tablecmds.c | 2 ++
src/backend/commands/tablespace.c | 4 +++
src/backend/commands/user.c | 49 +++++++++++++++++++++++++++++++++
src/backend/commands/variable.c | 3 ++
src/backend/utils/adt/acl.c | 39 ++++++++++++++++++++++++++
src/bin/pg_dump/pg_dumpall.c | 11 +++++++-
src/bin/pg_upgrade/check.c | 40 +++++++++++++++++++++++++--
src/bin/psql/command.c | 4 +--
src/bin/psql/describe.c | 5 +++-
src/bin/psql/describe.h | 2 +-
src/bin/psql/help.c | 4 +--
src/include/utils/acl.h | 1 +
src/test/regress/expected/rolenames.out | 20 ++++++++++++++
src/test/regress/sql/rolenames.sql | 10 +++++++
21 files changed, 226 insertions(+), 13 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2016-04-08 21:27:56 pgsql: Expose more out/readfuncs support functions.
Previous Message Stephen Frost 2016-04-08 20:30:14 pgsql: Fix improper usage of 'dump' bitmap