From: Tom Lane Date: Sun, 26 Jan 2003 23:16:23 +0000 (+0000) Subject: Back-patch fixes to detoast pg_group.grolist. X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=6a46da7922ecec8a1131cefdb237f04fc528674e;p=users%2Fbernd%2Fpostgres.git Back-patch fixes to detoast pg_group.grolist. --- diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index f9ddc16b79..4083cb17c3 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -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++)