Expand description
PostgreSQL COPY statement envelopes and stream codecs.
COPY FROM STDIN and COPY TO STDOUT carry their byte stream outside the
SQL statement. The regular crate::compile entry point therefore cannot
execute one by itself; callers use compile_copy to validate the SQL
envelope and pair it with the stream through the engine COPY API.
Structs§
- Copy
Options - Parsed COPY options after format-dependent defaults have been applied.
- Copy
Statement - Fully validated COPY statement envelope.
Enums§
- Copy
Direction - COPY stream direction.
- Copy
Endpoint - Where
PostgreSQLexpects the COPY stream to be connected. - Copy
Format - COPY data encoding implemented by the embedded stream API.
- Copy
Header PostgreSQL’s threeHEADERstates.- Copy
Target - The relation or query supplying COPY rows.
Functions§
- compile_
copy - Parse exactly one
PostgreSQLCOPY statement. - decode_
copy_ input - Decode a complete text or CSV COPY stream into rows.
- encode_
copy_ result - Encode one SQL result using
PostgreSQLCOPY text or CSV representation. - encode_
copy_ result_ with_ engine - Encode one SQL result while resolving catalog-backed
reg*text output through the engine hook.
Type Aliases§
- Copy
Input Field - One decoded COPY field.
Noneis SQL NULL; strings remain inPostgreSQL’s textual input representation so the target column’s normal input coercion remains authoritative.