diff options
author | Noah Misch <noah@leadboat.com> | 2017-03-12 19:35:31 -0400 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2017-03-12 19:35:31 -0400 |
commit | 2fd26b23b662dcb0cf649e983a58581cb911fc4b (patch) | |
tree | 2aac3510bbd79eb36b721277e9a1398fa3dfaef5 /src/backend/access/common/reloptions.c | |
parent | 9e0926468a1c41a31c09785787a737311dcd92c1 (diff) | |
download | postgresql-2fd26b23b662dcb0cf649e983a58581cb911fc4b.tar.gz postgresql-2fd26b23b662dcb0cf649e983a58581cb911fc4b.zip |
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().
Diffstat (limited to 'src/backend/access/common/reloptions.c')
-rw-r--r-- | src/backend/access/common/reloptions.c | 10 |
1 files changed, 4 insertions, 6 deletions
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 */ |