1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-24 10:47:04 +03:00

Minor code cleanup.

This commit is contained in:
Tom Lane 2002-04-28 00:36:38 +00:00
parent c06f6a6bc2
commit 7677fe0aa6

View File

@ -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)
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)
/* 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)
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);