From 2fd26b23b662dcb0cf649e983a58581cb911fc4b Mon Sep 17 00:00:00 2001 From: Noah Misch Date: Sun, 12 Mar 2017 19:35:31 -0400 Subject: Assume deconstruct_array() outputs are untoasted. In functions that issue a deconstruct_array() call, consistently use plain VARSIZE()/VARDATA() on the array elements. Prior practice was divided between those and VARSIZE_ANY_EXHDR()/VARDATA_ANY(). --- src/backend/access/common/reloptions.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/backend/access/common') diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c index c50649135fb..72e12532ab2 100644 --- a/src/backend/access/common/reloptions.c +++ b/src/backend/access/common/reloptions.c @@ -760,9 +760,8 @@ transformRelOptions(Datum oldOptions, List *defList, char *namspace, for (i = 0; i < noldoptions; i++) { - text *oldoption = DatumGetTextP(oldoptions[i]); - char *text_str = VARDATA(oldoption); - int text_len = VARSIZE(oldoption) - VARHDRSZ; + char *text_str = VARDATA(oldoptions[i]); + int text_len = VARSIZE(oldoptions[i]) - VARHDRSZ; /* Search for a match in defList */ foreach(cell, defList) @@ -1055,9 +1054,8 @@ parseRelOptions(Datum options, bool validate, relopt_kind kind, for (i = 0; i < noptions; i++) { - text *optiontext = DatumGetTextP(optiondatums[i]); - char *text_str = VARDATA(optiontext); - int text_len = VARSIZE(optiontext) - VARHDRSZ; + char *text_str = VARDATA(optiondatums[i]); + int text_len = VARSIZE(optiondatums[i]) - VARHDRSZ; int j; /* Search for a match in reloptions */ -- cgit v1.2.3