Skip to main content

parse_copy_from_stdin_head

Function parse_copy_from_stdin_head 

Source
pub fn parse_copy_from_stdin_head(sql: &str) -> Option<CopyFromSpec>
Expand description

Parse the head of a COPY <table> [(cols)] FROM stdin statement (text format). Returns None when the statement is not that shape — including COPY … TO stdout and file endpoints. A trailing WITH (…) options tail is accepted and ignored except that a non-text FORMAT makes this return None (the embed path only lowers the text format; callers surface a clear error).