Re: Parallel Seq Scan
От | Noah Misch |
---|---|
Тема | Re: Parallel Seq Scan |
Дата | |
Msg-id | 20151011235618.GA125073@tornado.leadboat.com обсуждение исходный текст |
Ответ на | Re: Parallel Seq Scan (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: Parallel Seq Scan
|
Список | pgsql-hackers |
On Sat, Sep 26, 2015 at 04:09:12PM -0400, Robert Haas wrote: > +/*------------------------------------------------------------------------- > + * datumSerialize > + * > + * Serialize a possibly-NULL datum into caller-provided storage. > +void > +datumSerialize(Datum value, bool isnull, bool typByVal, int typLen, > + char **start_address) > +{ > + int header; > + > + /* Write header word. */ > + if (isnull) > + header = -2; > + else if (typByVal) > + header = -1; > + else > + header = datumGetSize(value, typByVal, typLen); > + memcpy(*start_address, &header, sizeof(int)); > + *start_address += sizeof(int); > + > + /* If not null, write payload bytes. */ > + if (!isnull) > + { > + if (typByVal) > + { > + memcpy(*start_address, &value, sizeof(Datum)); > + *start_address += sizeof(Datum); > + } > + else > + { > + memcpy(*start_address, DatumGetPointer(value), header); > + *start_address += header; > + } > + } > +} I see no mention in this thread of varatt_indirect, but I anticipated datumSerialize() reacting to it the same way datumCopy() reacts. If datumSerialize() can get away without doing so, why is that?
В списке pgsql-hackers по дате отправления: