QTN2QT_palloc0.patch

text/plain

Filename: QTN2QT_palloc0.patch
Type: text/plain
Part: 0
Message: Re: Alignment padding bytes in arrays vs the planner

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: context
File+
src/backend/utils/adt/tsquery_util.c 1 0
*** a/src/backend/utils/adt/tsquery_util.c
--- b/src/backend/utils/adt/tsquery_util.c
***************
*** 336,342 **** QTN2QT(QTNode *in)
  	cntsize(in, &sumlen, &nnode);
  	len = COMPUTESIZE(nnode, sumlen);
  
! 	out = (TSQuery) palloc(len);
  	SET_VARSIZE(out, len);
  	out->size = nnode;
  
--- 336,342 ----
  	cntsize(in, &sumlen, &nnode);
  	len = COMPUTESIZE(nnode, sumlen);
  
! 	out = (TSQuery) palloc0(len);
  	SET_VARSIZE(out, len);
  	out->size = nnode;