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/utils/adt/jsonfuncs.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/utils/adt/jsonfuncs.c')
-rw-r--r-- | src/backend/utils/adt/jsonfuncs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c index 6a7aab2f432..9b46f8e8359 100644 --- a/src/backend/utils/adt/jsonfuncs.c +++ b/src/backend/utils/adt/jsonfuncs.c @@ -1240,8 +1240,8 @@ get_jsonb_path_all(FunctionCallInfo fcinfo, bool as_text) { jbvp = findJsonbValueFromContainerLen(container, JB_FOBJECT, - VARDATA_ANY(pathtext[i]), - VARSIZE_ANY_EXHDR(pathtext[i])); + VARDATA(pathtext[i]), + VARSIZE(pathtext[i]) - VARHDRSZ); } else if (have_array) { |