pgsql: Properly update the 'group' flatfile when modifying the user, in

Started by Bruce Momjianover 20 years ago1 messagescomitters
Jump to latest
#1Bruce Momjian
bruce@momjian.us

Log Message:
-----------
Properly update the 'group' flatfile when modifying the user, in case
they were added to a group. Also fix visibility of our own changes when
creating the group file. This fixes:

test=> CREATE GROUP g1;
CREATE GROUP

test=> CREATE USER u1 IN GROUP g1;
CREATE USER
test=> \! cat /u/pg/data/global/pg_group
"g1" "u1"

test=> CREATE USER u2 IN GROUP g1;
CREATE USER
test=> \! cat /u/pg/data/global/pg_group
"g1" "u1" "u2"

test=> ALTER USER u2 RENAME TO u3;
ALTER USER
test=> \! cat /u/pg/data/global/pg_group
"g1" "u1" "u3"

[ this code does not exist in CVS head.]

Per report from Dennis Vshivkov

Tags:
----
REL8_0_STABLE

Modified Files:
--------------
pgsql/src/backend/commands:
user.c (r1.147 -> r1.147.4.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/user.c.diff?r1=1.147&r2=1.147.4.1)