Skip to main content

postgres_source_details

Function postgres_source_details 

Source
pub fn postgres_source_details(a: &str) -> Result<Value, String>
Expand description

Extracts postgres source publication details (slot, timeline_id) from a catalog create_sql. Returns:

  • jsonb {"slot": <text>, "timeline_id": <u64 | null>} for CREATE SOURCE ... FROM POSTGRES CONNECTION ... (DETAILS = ...) statements.
  • jsonb null for any other statement.

Errors if the statement fails to parse, is a postgres source without a DETAILS option, or if the DETAILS value can’t be hex- and proto-decoded.