]> granicus.if.org Git - postgresql/commit
Properly update the 'group' flatfile when modifying the user, in case
authorBruce Momjian <bruce@momjian.us>
Wed, 26 Oct 2005 13:43:28 +0000 (13:43 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 26 Oct 2005 13:43:28 +0000 (13:43 +0000)
commitc3d56155d4a8f6c94d19a5caa91f355cd41eace1
treee8f75cbdb6359209dcfa362bb5c285bba1db64b0
parent8f03406ee91406262beb90ce516718e7b860e8d7
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
src/backend/commands/user.c