DB-1367 Sending marker for unchanged TOAST columns
parent
44cf35d4b5
commit
d01282a180
|
@ -27,6 +27,7 @@ message DatumMessage {
|
|||
string datum_string = 8;
|
||||
bytes datum_bytes = 9;
|
||||
Point datum_point = 10;
|
||||
bool datum_missing = 11;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -446,7 +446,8 @@ static void tuple_to_tuple_msg(Decoderbufs__DatumMessage **tmsg,
|
|||
getTypeOutputInfo(attr->atttypid, &typoutput, &typisvarlena);
|
||||
if (!isnull) {
|
||||
if (typisvarlena && VARATT_IS_EXTERNAL_ONDISK(origval)) {
|
||||
// TODO: Is there a way we can handle this?
|
||||
datum_msg.datum_missing = true;
|
||||
datum_msg.datum_case = DECODERBUFS__DATUM_MESSAGE__DATUM_DATUM_MISSING;
|
||||
elog(DEBUG1, "Not handling external on disk varlena at the moment.");
|
||||
} else if (!typisvarlena) {
|
||||
set_datum_value(&datum_msg, attr->atttypid, typoutput, origval);
|
||||
|
|
|
@ -230,7 +230,7 @@ const ProtobufCMessageDescriptor decoderbufs__point__descriptor =
|
|||
(ProtobufCMessageInit) decoderbufs__point__init,
|
||||
NULL,NULL,NULL /* reserved[123] */
|
||||
};
|
||||
static const ProtobufCFieldDescriptor decoderbufs__datum_message__field_descriptors[10] =
|
||||
static const ProtobufCFieldDescriptor decoderbufs__datum_message__field_descriptors[11] =
|
||||
{
|
||||
{
|
||||
"column_name",
|
||||
|
@ -352,6 +352,18 @@ static const ProtobufCFieldDescriptor decoderbufs__datum_message__field_descript
|
|||
0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */
|
||||
0,NULL,NULL /* reserved1,reserved2, etc */
|
||||
},
|
||||
{
|
||||
"datum_missing",
|
||||
11,
|
||||
PROTOBUF_C_LABEL_OPTIONAL,
|
||||
PROTOBUF_C_TYPE_BOOL,
|
||||
offsetof(Decoderbufs__DatumMessage, datum_case),
|
||||
offsetof(Decoderbufs__DatumMessage, datum_missing),
|
||||
NULL,
|
||||
NULL,
|
||||
0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */
|
||||
0,NULL,NULL /* reserved1,reserved2, etc */
|
||||
},
|
||||
};
|
||||
static const unsigned decoderbufs__datum_message__field_indices_by_name[] = {
|
||||
0, /* field[0] = column_name */
|
||||
|
@ -362,13 +374,14 @@ static const unsigned decoderbufs__datum_message__field_indices_by_name[] = {
|
|||
4, /* field[4] = datum_float */
|
||||
2, /* field[2] = datum_int32 */
|
||||
3, /* field[3] = datum_int64 */
|
||||
10, /* field[10] = datum_missing */
|
||||
9, /* field[9] = datum_point */
|
||||
7, /* field[7] = datum_string */
|
||||
};
|
||||
static const ProtobufCIntRange decoderbufs__datum_message__number_ranges[1 + 1] =
|
||||
{
|
||||
{ 1, 0 },
|
||||
{ 0, 10 }
|
||||
{ 0, 11 }
|
||||
};
|
||||
const ProtobufCMessageDescriptor decoderbufs__datum_message__descriptor =
|
||||
{
|
||||
|
@ -378,7 +391,7 @@ const ProtobufCMessageDescriptor decoderbufs__datum_message__descriptor =
|
|||
"Decoderbufs__DatumMessage",
|
||||
"decoderbufs",
|
||||
sizeof(Decoderbufs__DatumMessage),
|
||||
10,
|
||||
11,
|
||||
decoderbufs__datum_message__field_descriptors,
|
||||
decoderbufs__datum_message__field_indices_by_name,
|
||||
1, decoderbufs__datum_message__number_ranges,
|
||||
|
|
|
@ -53,6 +53,7 @@ typedef enum {
|
|||
DECODERBUFS__DATUM_MESSAGE__DATUM_DATUM_STRING = 8,
|
||||
DECODERBUFS__DATUM_MESSAGE__DATUM_DATUM_BYTES = 9,
|
||||
DECODERBUFS__DATUM_MESSAGE__DATUM_DATUM_POINT = 10,
|
||||
DECODERBUFS__DATUM_MESSAGE__DATUM_DATUM_MISSING = 11,
|
||||
} Decoderbufs__DatumMessage__DatumCase;
|
||||
|
||||
struct _Decoderbufs__DatumMessage
|
||||
|
@ -71,6 +72,7 @@ struct _Decoderbufs__DatumMessage
|
|||
char *datum_string;
|
||||
ProtobufCBinaryData datum_bytes;
|
||||
Decoderbufs__Point *datum_point;
|
||||
protobuf_c_boolean datum_missing;
|
||||
};
|
||||
};
|
||||
#define DECODERBUFS__DATUM_MESSAGE__INIT \
|
||||
|
|
Loading…
Reference in New Issue