data.drivers._pelt._codecs_uuid_bytea

Page actions AI-ready formats and sharing
Open LLM text
Share with AI
Ask Claude Ask ChatGPT Ask Gemini Ask Copilot

E2 codec family:uuid and bytea.

Two leaf codecs that round-trip Pythonuuid.UUID and bytesagainst the PostgreSQL binary + text wire formats. Both are non-parametric(a fixed OID, no element/typmod),…

E2 codec family:uuid and bytea.

Two leaf codecs that round-trip Pythonuuid.UUID and bytesagainst the PostgreSQL binary + text wire formats. Both are non-parametric (a fixed OID, no element/typmod), so they ship inLEAF_CODECSready for the registry — the long-tail temporal/numeric and the parametric array/composite families land in sibling E2 modules built on the same Codecshape.

Wire layouts (cf.pg_type.dat + src/backend/utils/adt/uuid.c / varlena.c):

  • uuid(OID 2950): binary is the 16 raw UUID bytes, big-endian (network) order — the same byte order asbytes. Text is the canonical 8-4-4-4-12 hyphenated hex.
  • bytea(OID 17): binary is the raw octet string, a verbatim passthrough. Text is the PostgreSQL hex format — the literal prefix\xfollowed by lowercase hex (the default bytea_output); the legacy escapeformat is not emitted and not decoded here.

Faults raise pelt'sProtocolError (a PELT_* code), never a bare exception — a malformed-lengthuuid or an unknown byteatext prefix is a backend/stream defect, not programmer misuse. Live-PG parity deferred to E4/E6 integration.

data.drivers._pelt._codecs_uuid_bytea

Name Type Default Description
type
qualified_name
element_type
description
source_file
line_number
is_autodoc
autodoc_element
_autodoc_template
_autodoc_url_path
_autodoc_page_type
title
doc_content_hash

Symbols on this page

_coerce_uuid
function
def _coerce_uuid(value: Any) -> _uuid.UUID

Accept aUUIDdirectly, or a hyphenated/plain hex string.

Parameters

Name Type Default Description
value Any

View source · /home/runner/work/chirp/chirp/site/../src/chirp/data/drivers/_pelt/_codecs_uuid_bytea.py:1