Re: Question about MemoryContextRegisterResetCallback

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Question about MemoryContextRegisterResetCallback
Дата
Msg-id 23705.1547500181@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Question about MemoryContextRegisterResetCallback  (Michel Pelletier <pelletier.michel@gmail.com>)
Список pgsql-general
Michel Pelletier <pelletier.michel@gmail.com> writes:
> It mentions "on disk" does this mean the flattened representation must be
> binary compatible with what matrix_send emits?  They will likely be the
> same now, so I can see this as a convenience, but is it a requirement?

No, your on-the-wire representation for send/recv can be different from
what you put on-disk.  In fact, typically I'd recommend that it *should*
be different to some extent, to insulate COPY BINARY data from internal
representation choices and simplify any client code that might look at
the "binary" format.  See for example numeric_send/recv, which don't
just transmit the internal format as-is --- and that was a good thing
because it let us implement various storage optimizations over the years
without breaking COPY BINARY compatibility.  It's also a good idea to
try to make the on-the-wire representation independent of server
endianness and alignment rules.

The point of the comment you're looking at is that the "flat" varlena
representation that you have to translate to/from is the same as what
will be on-disk if the datum gets stored someplace.

            regards, tom lane


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

Предыдущее
От: Sherrylyn Branchaw
Дата:
Сообщение: Re: pg_restore restores privileges differently from psql
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_restore restores privileges differently from psql