aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonfuncs.c
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2017-03-12 19:35:31 -0400
committerNoah Misch <noah@leadboat.com>2017-03-12 19:35:31 -0400
commit2fd26b23b662dcb0cf649e983a58581cb911fc4b (patch)
tree2aac3510bbd79eb36b721277e9a1398fa3dfaef5 /src/backend/utils/adt/jsonfuncs.c
parent9e0926468a1c41a31c09785787a737311dcd92c1 (diff)
downloadpostgresql-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.c4
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)
{