Tzahi Fadida <Tzahi(dot)ML(at)gmail(dot)com> writes:
> This is an excerpt from my code:
> newtset->tids = (bytea *) fastgetattr(tupleTSet, LABELS_ALIGNED,
> fctx->tupleSetDesc, &isnull);
> It seems that for an empty bytea (only the size of the header), i get that
> VARSIZE(newtset->tids)==534765440
> instead of VARHDRSZ.
That code has always been broken, you just failed to exercise the
problem before. There needs to be a detoasting call there, not
merely a cast. DatumGetByteaP() would probably be appropriate.
regards, tom lane