Skip to main content

Module postgres_copy

Module postgres_copy 

Source
Expand description

PostgreSQL COPY statement parser.

Parses COPY … FROM stdin data blocks to extract individual rows and optionally extract PK/FK column values for dependency tracking.

Re-exports§

pub use super::mysql_insert::PkTuple;

Structs§

CopyParser
Parser for PostgreSQL COPY data blocks
ParsedCopyRow
A parsed row from a COPY data block

Functions§

decode_copy_escapes
Decode PostgreSQL COPY escape sequences (\t, \n, \r, \\; a \N or unknown escape passes through verbatim).
parse_copy_columns
Parse column list from COPY header
parse_postgres_copy_rows
Parse all rows from a PostgreSQL COPY data block
parse_postgres_copy_rows_with
Like parse_postgres_copy_rows, but with an explicit RowExtraction level so consumers that don’t need all_values skip that work.
visit_postgres_copy_rows_with
Stream the rows of a COPY data block to a visitor, one at a time, without building a block-sized Vec. f returns a RowFlow to stop early.