Re: jsonb access operators inefficiency
От | Teodor Sigaev |
---|---|
Тема | Re: jsonb access operators inefficiency |
Дата | |
Msg-id | 5388B5A6.8060002@sigaev.ru обсуждение исходный текст |
Ответ на | Re: jsonb access operators inefficiency (Andrew Dunstan <andrew@dunslane.net>) |
Список | pgsql-hackers |
> I see that palloc.h says: > > The result of palloc() is always word-aligned void * repalloc(void *pointer, Size size) { ... /* * Try to detect bogus pointers handed to us, poorly though we can. * Presumably, a pointer that isn't MAXALIGNEDisn't pointing at an * allocated chunk. */ Assert(pointer != NULL); Assert(pointer == (void *) MAXALIGN(pointer)); ... > > > so maybe my alignment fear is misplaced. So my remaining question is > whether this is OK stylistically. Something like this? initStringInfoVarlena()/makeStringInfoVarlena() {initStringInfo()appendStringInfoSpaces(jtext, VARHDRSZ); } char* formStringInfoVarlena() {SET_VARSIZE(jtext->data, jtext->len);return jtext->data; } -- Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/
В списке pgsql-hackers по дате отправления: