pgsql: In AlterRole, make bypassrls an int

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: In AlterRole, make bypassrls an int
Date: 2015-08-21 12:23:38
Message-ID: E1ZSlMA-0005te-WF@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

In AlterRole, make bypassrls an int

When reworking bypassrls in AlterRole to operate the same way the other
attribute handling is done, I missed that the variable was incorrectly a
bool rather than an int. This meant that on platforms with an unsigned
char, we could end up with incorrect behavior during ALTER ROLE.

Pointed out by Andres thanks to tests he did changing our bool to be the
one from stdbool.h which showed this and a number of other issues.

Add regression tests to test CREATE/ALTER role for the various role
attributes. Arrange to leave roles behind for testing pg_dumpall, but
none which have the LOGIN attribute.

Back-patch to 9.5 where the AlterRole bug exists.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7ec8296e70f0f03cbdb3e0eb4f05ad5be0f810c8

Modified Files
--------------
src/backend/commands/user.c | 2 +-
src/test/regress/expected/roleattributes.out | 236 ++++++++++++++++++++++++++
src/test/regress/parallel_schedule | 2 +-
src/test/regress/serial_schedule | 1 +
src/test/regress/sql/roleattributes.sql | 85 ++++++++++
5 files changed, 324 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2015-08-21 12:23:39 pgsql: Rename 'cmd' to 'cmd_name' in CreatePolicyStmt
Previous Message Peter Eisentraut 2015-08-21 02:47:46 pgsql: doc: Whitespace and formatting fixes