Re: Problems with the varlena patch in my module

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problems with the varlena patch in my module
Дата
Msg-id 29989.1175908114@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Problems with the varlena patch in my module  (Tzahi Fadida <Tzahi.ML@gmail.com>)
Ответы Re: Problems with the varlena patch in my module  (Tzahi Fadida <Tzahi.ML@gmail.com>)
Список pgsql-hackers
Tzahi Fadida <Tzahi.ML@gmail.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tzahi Fadida
Дата:
Сообщение: Problems with the varlena patch in my module
Следующее
От: Andreas Pflug
Дата:
Сообщение: Re: Eliminating unnecessary left joins