*** pgsql/src/backend/commands/dbcommands.c 2007/04/12 15:04:47 1.173.2.3 --- pgsql/src/backend/commands/dbcommands.c 2010/03/25 14:45:35 1.173.2.4 *************** *** 15,21 **** * * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.173.2.2 2007/01/27 20:15:55 tgl Exp $ * *------------------------------------------------------------------------- */ --- 15,21 ---- * * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.173.2.3 2007/04/12 15:04:47 tgl Exp $ * *------------------------------------------------------------------------- */ *************** AlterDatabaseSet(AlterDatabaseSetStmt *s *** 924,932 **** if (strcmp(stmt->variable, "all") == 0 && valuestr == NULL) { ! /* RESET ALL */ ! repl_null[Anum_pg_database_datconfig - 1] = 'n'; ! repl_val[Anum_pg_database_datconfig - 1] = (Datum) 0; } else { --- 924,953 ---- 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 datconfig to null; otherwise use the returned ! * array ! */ ! datum = heap_getattr(tuple, Anum_pg_database_datconfig, ! RelationGetDescr(rel), &isnull); ! if (!isnull) ! new = GUCArrayReset(DatumGetArrayTypeP(datum)); ! if (new) ! { ! repl_val[Anum_pg_database_datconfig - 1] = PointerGetDatum(new); ! repl_repl[Anum_pg_database_datconfig - 1] = 'r'; ! repl_null[Anum_pg_database_datconfig - 1] = ' '; ! } ! else ! { ! repl_null[Anum_pg_database_datconfig - 1] = 'n'; ! repl_val[Anum_pg_database_datconfig - 1] = (Datum) 0; ! } } else {