1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-09 06:21:09 +03:00

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
This commit is contained in:
Peter Eisentraut
2022-07-04 07:25:26 +02:00
parent f10a025cfe
commit 2ce648f750
3 changed files with 40 additions and 72 deletions

View File

@@ -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);
}