Expand description
Shared helpers for PostgreSQL COPY data blocks.
The parser emits a COPY statement’s data section (the lines between
COPY ... FROM stdin; and the \. terminator) as a separate “Unknown”
statement. Both validate and diff need to recognize such blocks and
trim their leading whitespace; this module owns that logic so the two
commands (and any future COPY consumer) cannot drift.
Functions§
- is_
copy_ data_ block - Returns true if
stmtlooks like a PostgreSQL COPY data block, i.e. it ends with the\.terminator line. - trim_
copy_ data - Trim leading whitespace/newlines from a COPY data block without copying.