~ubuntu-branches/ubuntu/natty/postgresql-8.4/natty-security

« back to all changes in this revision

Viewing changes to src/backend/commands/user.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-11 16:59:35 UTC
  • mfrom: (5.1.1 karmic)
  • Revision ID: james.westby@ubuntu.com-20090711165935-jfwin6gfrxf0gfsi
Tags: 8.4.0-2
* debian/libpq-dev.install: Ship catalog/genbki.h. (Closes: #536139)
* debian/rules: Drop --enable-cassert for final release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
7
7
 * Portions Copyright (c) 1994, Regents of the University of California
8
8
 *
9
 
 * $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.186 2009/01/30 17:24:47 heikki Exp $
 
9
 * $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.187 2009/06/11 14:48:56 momjian Exp $
10
10
 *
11
11
 *-------------------------------------------------------------------------
12
12
 */
684
684
        }
685
685
 
686
686
        new_tuple = heap_modify_tuple(tuple, pg_authid_dsc, new_record,
687
 
                                                                 new_record_nulls, new_record_repl);
 
687
                                                                  new_record_nulls, new_record_repl);
688
688
        simple_heap_update(pg_authid_rel, &tuple->t_self, new_tuple);
689
689
 
690
690
        /* Update indexes */
802
802
        }
803
803
 
804
804
        newtuple = heap_modify_tuple(oldtuple, RelationGetDescr(rel),
805
 
                                                                repl_val, repl_null, repl_repl);
 
805
                                                                 repl_val, repl_null, repl_repl);
806
806
 
807
807
        simple_heap_update(rel, &oldtuple->t_self, newtuple);
808
808
        CatalogUpdateIndexes(rel, newtuple);
1143
1143
                if (rolename == NULL || priv->cols != NIL)
1144
1144
                        ereport(ERROR,
1145
1145
                                        (errcode(ERRCODE_INVALID_GRANT_OPERATION),
1146
 
                                         errmsg("column names cannot be included in GRANT/REVOKE ROLE")));
 
1146
                        errmsg("column names cannot be included in GRANT/REVOKE ROLE")));
1147
1147
 
1148
1148
                roleid = get_roleid_checked(rolename);
1149
1149
                if (stmt->is_grant)
1366
1366
                        new_record_repl[Anum_pg_auth_members_grantor - 1] = true;
1367
1367
                        new_record_repl[Anum_pg_auth_members_admin_option - 1] = true;
1368
1368
                        tuple = heap_modify_tuple(authmem_tuple, pg_authmem_dsc,
1369
 
                                                                         new_record,
1370
 
                                                                         new_record_nulls, new_record_repl);
 
1369
                                                                          new_record,
 
1370
                                                                          new_record_nulls, new_record_repl);
1371
1371
                        simple_heap_update(pg_authmem_rel, &tuple->t_self, tuple);
1372
1372
                        CatalogUpdateIndexes(pg_authmem_rel, tuple);
1373
1373
                        ReleaseSysCache(authmem_tuple);
1375
1375
                else
1376
1376
                {
1377
1377
                        tuple = heap_form_tuple(pg_authmem_dsc,
1378
 
                                                                   new_record, new_record_nulls);
 
1378
                                                                        new_record, new_record_nulls);
1379
1379
                        simple_heap_insert(pg_authmem_rel, tuple);
1380
1380
                        CatalogUpdateIndexes(pg_authmem_rel, tuple);
1381
1381
                }
1485
1485
                        new_record_repl[Anum_pg_auth_members_admin_option - 1] = true;
1486
1486
 
1487
1487
                        tuple = heap_modify_tuple(authmem_tuple, pg_authmem_dsc,
1488
 
                                                                         new_record,
1489
 
                                                                         new_record_nulls, new_record_repl);
 
1488
                                                                          new_record,
 
1489
                                                                          new_record_nulls, new_record_repl);
1490
1490
                        simple_heap_update(pg_authmem_rel, &tuple->t_self, tuple);
1491
1491
                        CatalogUpdateIndexes(pg_authmem_rel, tuple);
1492
1492
                }