diff options
author | Tom Lane | 2003-01-26 23:16:23 +0000 |
---|---|---|
committer | Tom Lane | 2003-01-26 23:16:23 +0000 |
commit | 2357fd166fb1d665af1fe8aceeed9a87829b2217 (patch) | |
tree | 3be6cf4bb00d5fdaf886557b44d90cc6707f697c | |
parent | 12fa07750e47411e092f31e2a68bcaa36e4a3c78 (diff) |
Back-patch fixes to detoast pg_group.grolist.
-rw-r--r-- | src/backend/commands/user.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index a7ccd3768f..55ce78e3a8 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.90 2001/11/05 17:46:25 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.90.2.1 2003/01/26 23:16:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -27,6 +27,7 @@ #include "libpq/crypt.h" #include "miscadmin.h" #include "storage/pmsignal.h" +#include "utils/acl.h" #include "utils/array.h" #include "utils/builtins.h" #include "utils/fmgroids.h" @@ -1075,7 +1076,7 @@ AlterGroup(AlterGroupStmt *stmt, const char *tag) Datum datum = heap_getattr(group_tuple, Anum_pg_group_grolist, pg_group_dsc, &null); int i; - oldarray = (ArrayType *) datum; + oldarray = null ? ((IdList *) NULL) : DatumGetIdListP(datum); Assert(null || ARR_NDIM(oldarray) == 1); /* first add the old array to the hitherto empty list */ if (!null) @@ -1195,7 +1196,7 @@ AlterGroup(AlterGroupStmt *stmt, const char *tag) *item; int i; - oldarray = (ArrayType *) datum; + oldarray = DatumGetIdListP(datum); Assert(ARR_NDIM(oldarray) == 1); /* first add the old array to the hitherto empty list */ for (i = ARR_LBOUND(oldarray)[0]; i < ARR_LBOUND(oldarray)[0] + ARR_DIMS(oldarray)[0]; i++) |