aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2022-07-04 07:25:26 +0200
committerPeter Eisentraut <peter@eisentraut.org>2022-07-04 19:43:58 +0200
commit2ce648f750a91b04bfa371a8f966703a382fcc97 (patch)
treee0a387cb4a3f6dc3acc0412c286a99eb9835d069 /src/backend/access
parentf10a025cfe97c1a341f636368e67af5ca644c5d8 (diff)
downloadpostgresql-2ce648f750a91b04bfa371a8f966703a382fcc97.tar.gz
postgresql-2ce648f750a91b04bfa371a8f966703a382fcc97.zip
Refactor sending of RowDescription messages in replication protocol
Some routines open-coded the construction of RowDescription messages. Instead, we have support for doing this using tuple descriptors and DestRemoteSimple, so use that instead. 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')
-rw-r--r--src/backend/access/common/tupdesc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/backend/access/common/tupdesc.c b/src/backend/access/common/tupdesc.c
index 9f41b1e8543..d6fb261e201 100644
--- a/src/backend/access/common/tupdesc.c
+++ b/src/backend/access/common/tupdesc.c
@@ -739,6 +739,15 @@ TupleDescInitBuiltinEntry(TupleDesc desc,
att->attcollation = InvalidOid;
break;
+ case OIDOID:
+ att->attlen = 4;
+ att->attbyval = true;
+ att->attalign = TYPALIGN_INT;
+ att->attstorage = TYPSTORAGE_PLAIN;
+ att->attcompression = InvalidCompressionMethod;
+ att->attcollation = InvalidOid;
+ break;
+
default:
elog(ERROR, "unsupported type %u", oidtypeid);
}