Skip to main content

attach_postgres_sections

Function attach_postgres_sections 

Source
pub fn attach_postgres_sections(
    forward_topology_bytes: &[u8],
    inbound_topology_bytes: Option<&[u8]>,
    metadata: &PostgresMetadata,
) -> Result<Vec<u8>, PostgresGraphError>
Expand description

Appends or replaces Postgres-owned sections on CSR topology bytes.

Forward topology sections are preserved. When inbound_topology_bytes is Some, CSR offsets/targets are copied into inbound section kinds 0x0201 / 0x0202.

§Errors

Returns PostgresGraphError::Snapshot when input bytes are invalid, or PostgresGraphError::Build when re-encoding fails.

§Performance

This function is O(b + s).