thinko in convertToJsonb()

Поиск
Список
Период
Сортировка
От Mark Dilger
Тема thinko in convertToJsonb()
Дата
Msg-id 2FA1D6D6-78DC-4754-8E7D-360AE07DFE8A@port25.com
обсуждение исходный текст
Ответы Re: thinko in convertToJsonb()  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
The call:
reserveFromBuffer(&buffer, sizeof(VARHDRSZ))

is assuming that the size of varlena header is the same
size as the type used to return that size, which happens
to be so, but someone could easily change that macro
to:
#define VARHDRSZ ((int64) sizeof(int32))

And you'd want to reserve sizeof(int32), not sizeof(int64)
in convertToJsonb.

Perhaps the code really meant to say:
reserveFromBuffer(&buffer, VARHDRSZ)


mark



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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: logical column ordering
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: logical column ordering