Skip to main content

copy_from_stdin_from_sql

Function copy_from_stdin_from_sql 

Source
pub(crate) fn copy_from_stdin_from_sql(
    sql: &str,
) -> PgWireResult<Option<CopyFromStdin>>
Expand description

Parses a leading COPY ... FROM STDIN statement from SQL text.

The statement is parsed textually — not through sqlparser — because the WITH (...) option list is open: formats may accept options beyond sqlparser’s COPY grammar, and unknown options must reach the format codec instead of failing statement parsing. Returns Ok(None) when the string does not lead with a copy-in statement.