*** pgsql/src/backend/access/common/reloptions.c 2008/03/25 22:42:42 1.9 --- pgsql/src/backend/access/common/reloptions.c 2008/04/17 21:37:28 1.10 *************** *** 8,14 **** * * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/access/common/reloptions.c,v 1.8 2008/01/01 19:45:46 momjian Exp $ * *------------------------------------------------------------------------- */ --- 8,14 ---- * * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/access/common/reloptions.c,v 1.9 2008/03/25 22:42:42 tgl Exp $ * *------------------------------------------------------------------------- */ *************** transformRelOptions(Datum oldOptions, Li *** 58,64 **** astate = NULL; /* Copy any oldOptions that aren't to be replaced */ ! if (oldOptions != (Datum) 0) { ArrayType *array = DatumGetArrayTypeP(oldOptions); Datum *oldoptions; --- 58,64 ---- astate = NULL; /* Copy any oldOptions that aren't to be replaced */ ! if (PointerIsValid(DatumGetPointer(oldOptions))) { ArrayType *array = DatumGetArrayTypeP(oldOptions); Datum *oldoptions; *************** untransformRelOptions(Datum options) *** 164,170 **** int i; /* Nothing to do if no options */ ! if (options == (Datum) 0) return result; array = DatumGetArrayTypeP(options); --- 164,170 ---- int i; /* Nothing to do if no options */ ! if (!PointerIsValid(DatumGetPointer(options))) return result; array = DatumGetArrayTypeP(options); *************** parseRelOptions(Datum options, int numke *** 220,226 **** MemSet(values, 0, numkeywords * sizeof(char *)); /* Done if no options */ ! if (options == (Datum) 0) return; array = DatumGetArrayTypeP(options); --- 220,226 ---- MemSet(values, 0, numkeywords * sizeof(char *)); /* Done if no options */ ! if (!PointerIsValid(DatumGetPointer(options))) return; array = DatumGetArrayTypeP(options); *************** index_reloptions(RegProcedure amoptions, *** 349,355 **** Assert(RegProcedureIsValid(amoptions)); /* Assume function is strict */ ! if (reloptions == (Datum) 0) return NULL; /* Can't use OidFunctionCallN because we might get a NULL result */ --- 349,355 ---- Assert(RegProcedureIsValid(amoptions)); /* Assume function is strict */ ! if (!PointerIsValid(DatumGetPointer(reloptions))) return NULL; /* Can't use OidFunctionCallN because we might get a NULL result */