WalEx.Decoder (WalEx v4.8.0)

Copy Markdown View Source

Binary decoder for the Postgres logical replication pgoutput plugin.

decode_message/1 parses a single replication message (Begin, Commit, Origin, Relation, Insert, Update, Delete, Truncate, Type, or Unsupported) and returns the matching struct from WalEx.Decoder.Messages.

Summary

Functions

Parses logical replication messages from Postgres

Functions

decode_message(message)

Parses logical replication messages from Postgres

Examples

iex> decode_message(<<73, 0, 0, 96, 0, 78, 0, 2, 116, 0, 0, 0, 3, 98, 97, 122, 116, 0, 0, 0, 3, 53, 54, 48>>)
%WalEx.Decoder.Messages.Insert{relation_id: 24576, tuple_data: {"baz", "560"}}