Properly update the 'group' flatfile when modifying the user, in case

Bruce Momjian <bruce@momjian.us>

Commit: c3d56155d4a8f6c94d19a5caa91f355cd41eace1
Author: Bruce Momjian <bruce@momjian.us>
Date: 2005-10-26T13:43:28Z
Releases: 8.0.5
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

Files

PathChange+/−
src/backend/commands/user.c modified +10 −9