Skip to content
Snippets Groups Projects
Commit 7677fe0a authored by Tom Lane's avatar Tom Lane
Browse files

Minor code cleanup.

parent c06f6a6b
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.99 2002/04/27 21:24:34 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.100 2002/04/28 00:36:38 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1099,7 +1099,7 @@ CreateGroup(CreateGroupStmt *stmt) ...@@ -1099,7 +1099,7 @@ CreateGroup(CreateGroupStmt *stmt)
List *item, List *item,
*option, *option,
*newlist = NIL; *newlist = NIL;
ArrayType *userarray; IdList *grolist;
int sysid = 0; int sysid = 0;
List *userElts = NIL; List *userElts = NIL;
DefElem *dsysid = NULL; DefElem *dsysid = NULL;
...@@ -1196,9 +1196,9 @@ CreateGroup(CreateGroupStmt *stmt) ...@@ -1196,9 +1196,9 @@ CreateGroup(CreateGroupStmt *stmt)
/* build an array to insert */ /* build an array to insert */
if (newlist) if (newlist)
userarray = IdListToArray(newlist); grolist = IdListToArray(newlist);
else else
userarray = NULL; grolist = NULL;
/* /*
* Form a tuple to insert * Form a tuple to insert
...@@ -1206,11 +1206,11 @@ CreateGroup(CreateGroupStmt *stmt) ...@@ -1206,11 +1206,11 @@ CreateGroup(CreateGroupStmt *stmt)
new_record[Anum_pg_group_groname - 1] = new_record[Anum_pg_group_groname - 1] =
DirectFunctionCall1(namein, CStringGetDatum(stmt->name)); DirectFunctionCall1(namein, CStringGetDatum(stmt->name));
new_record[Anum_pg_group_grosysid - 1] = Int32GetDatum(sysid); new_record[Anum_pg_group_grosysid - 1] = Int32GetDatum(sysid);
new_record[Anum_pg_group_grolist - 1] = PointerGetDatum(userarray); new_record[Anum_pg_group_grolist - 1] = PointerGetDatum(grolist);
new_record_nulls[Anum_pg_group_groname - 1] = ' '; new_record_nulls[Anum_pg_group_groname - 1] = ' ';
new_record_nulls[Anum_pg_group_grosysid - 1] = ' '; new_record_nulls[Anum_pg_group_grosysid - 1] = ' ';
new_record_nulls[Anum_pg_group_grolist - 1] = userarray ? ' ' : 'n'; new_record_nulls[Anum_pg_group_grolist - 1] = grolist ? ' ' : 'n';
tuple = heap_formtuple(pg_group_dsc, new_record, new_record_nulls); tuple = heap_formtuple(pg_group_dsc, new_record, new_record_nulls);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment