Skip to main content

Module types

Module types 

Source
Expand description

PostgreSQL type OID mapping (Phase 3.1 PG parity).

PG clients identify column types by OID (see pg_catalog.pg_type). RedDB’s Value enum is richer than PG’s canonical set, so we collapse domain-specific variants (Email, Phone, Money, …) onto their closest PG equivalent — TEXT, NUMERIC, etc. This keeps generic clients working; clients that need the fine-grained types call the native gRPC path.

Reference: PostgreSQL source src/include/catalog/pg_type_d.h.

Enums§

PgOid
A subset of PG type OIDs that cover every case we need to encode.

Functions§

pg_param_to_value
value_to_pg_wire_bytes
Encode a Value as the UTF-8 text representation PG’s text-mode protocol expects. Binary format is opt-in via a flag in the client’s Bind message — we don’t advertise binary support yet, so simple text encoding is sufficient for every supported client.