1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-19 13:42:17 +03:00

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().
This commit is contained in:
Noah Misch
2017-03-12 19:35:31 -04:00
parent 9e0926468a
commit 2fd26b23b6
6 changed files with 33 additions and 30 deletions

View File

@@ -172,8 +172,8 @@ gin_extract_jsonb_query(PG_FUNCTION_ARGS)
if (key_nulls[i])
continue;
entries[j++] = make_text_key(JGINFLAG_KEY,
VARDATA_ANY(key_datums[i]),
VARSIZE_ANY_EXHDR(key_datums[i]));
VARDATA(key_datums[i]),
VARSIZE(key_datums[i]) - VARHDRSZ);
}
*nentries = j;