aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/common/printsimple.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2022-07-06 08:28:02 +0200
committerPeter Eisentraut <peter@eisentraut.org>2022-07-06 08:42:56 +0200
commit16d52fc89dbe8394ed318521e076f08fd2e4bf8c (patch)
tree382dadb660cce797b66408e9daee0bbbe71fadf8 /src/backend/access/common/printsimple.c
parentb55f62abb2c2e07dfae99e19a2b3d7ca9e58dc1a (diff)
downloadpostgresql-16d52fc89dbe8394ed318521e076f08fd2e4bf8c.tar.gz
postgresql-16d52fc89dbe8394ed318521e076f08fd2e4bf8c.zip
Refactor sending of DataRow messages in replication protocol
Some routines open-coded the construction of DataRow messages. Use TupOutputState struct and associated functions instead, which was already done in some places. SendTimeLineHistory() is a bit more complicated and isn't converted by this. Reviewed-by: Nathan Bossart <nathandbossart@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/7e4fdbdc-699c-4cd0-115d-fb78a957fc22@enterprisedb.com
Diffstat (limited to 'src/backend/access/common/printsimple.c')
-rw-r--r--src/backend/access/common/printsimple.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/backend/access/common/printsimple.c b/src/backend/access/common/printsimple.c
index e99aa279f6f..c99ae54cb02 100644
--- a/src/backend/access/common/printsimple.c
+++ b/src/backend/access/common/printsimple.c
@@ -121,6 +121,17 @@ printsimple(TupleTableSlot *slot, DestReceiver *self)
}
break;
+ case OIDOID:
+ {
+ Oid num = ObjectIdGetDatum(value);
+ char str[10]; /* 10 digits */
+ int len;
+
+ len = pg_ultoa_n(num, str);
+ pq_sendcountedtext(&buf, str, len, false);
+ }
+ break;
+
default:
elog(ERROR, "unsupported type OID: %u", attr->atttypid);
}