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
Valueas the UTF-8 text representation PG’s text-mode protocol expects. Binary format is opt-in via a flag in the client’sBindmessage — we don’t advertise binary support yet, so simple text encoding is sufficient for every supported client.