jackc / pglogrepl

PostgreSQL logical replication library for Go.
MIT License
330 stars 62 forks source link

Incorrect type for Relation message's type modifier #27

Closed kendru closed 2 years ago

kendru commented 2 years ago

The TypeModifier column of RelationMessageColumn is currently a uint32, but the protocol specifies that this value should be interpreted as a signed integer (see https://www.postgresql.org/docs/10/protocol-logicalrep-message-formats.html). Because -1 is a common value for this field (see https://www.postgresql.org/docs/10/catalog-pg-attribute.html), it should be interpreted as an int32.