*** pgsql/src/backend/commands/user.c 2005/11/04 17:25:15 1.164 --- pgsql/src/backend/commands/user.c 2010/03/25 14:45:35 1.164.2.1 *************** *** 6,12 **** * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * ! * $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.163 2005/10/29 00:31:51 petere Exp $ * *------------------------------------------------------------------------- */ --- 6,12 ---- * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * ! * $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.164 2005/11/04 17:25:15 tgl Exp $ * *------------------------------------------------------------------------- */ *************** AlterRoleSet(AlterRoleSetStmt *stmt) *** 757,764 **** repl_repl[Anum_pg_authid_rolconfig - 1] = 'r'; if (strcmp(stmt->variable, "all") == 0 && valuestr == NULL) { ! /* RESET ALL */ ! repl_null[Anum_pg_authid_rolconfig - 1] = 'n'; } else { --- 757,786 ---- repl_repl[Anum_pg_authid_rolconfig - 1] = 'r'; if (strcmp(stmt->variable, "all") == 0 && valuestr == NULL) { ! ArrayType *new = NULL; ! Datum datum; ! bool isnull; ! ! /* ! * in RESET ALL, request GUC to reset the settings array; if none ! * left, we can set rolconfig to null; otherwise use the returned ! * array ! */ ! datum = SysCacheGetAttr(AUTHNAME, oldtuple, ! Anum_pg_authid_rolconfig, &isnull); ! if (!isnull) ! new = GUCArrayReset(DatumGetArrayTypeP(datum)); ! if (new) ! { ! repl_val[Anum_pg_authid_rolconfig - 1] = PointerGetDatum(new); ! repl_repl[Anum_pg_authid_rolconfig - 1] = 'r'; ! repl_null[Anum_pg_authid_rolconfig - 1] = ' '; ! } ! else ! { ! repl_null[Anum_pg_authid_rolconfig - 1] = 'n'; ! repl_val[Anum_pg_authid_rolconfig - 1] = (Datum) 0; ! } } else {