Expand description
The influxdb line protocol format for COPY FROM STDIN.
COPY FROM STDIN WITH (FORMAT influxdb, precision 'ns') ingests
InfluxDB line protocol
text. The format is table-less — each line names its own measurement
— and does not parse here at all: the COPY layer buffers the whole
payload (bounded by crate::postgres::copy_in::COPY_IN_MAX_PAYLOAD_BYTES)
and completes the copy by handing it to the frontend’s line-protocol
write pipeline as one body, exactly like the HTTP
/v1/influxdb/v1/write endpoint receives one request body:
conversion, permissions, interceptors, timestamp alignment, merge
mode and inserts are the same path, and record boundaries (including
newlines inside quoted field values and after escapes) are decided
by the line-protocol parser alone — the COPY layer never splits
records.
One COPY statement is therefore one bounded ingestion request; a larger import is multiple COPY statements.
The precision option carries the same values as the HTTP
precision query parameter (ns, us, ms, s, …), defaults to
nanoseconds, and is resolved by the shared parse_time_precision.
Structs§
- Influxdb
Options 🔒 - The format’s validated options. A
Noneprecision carries the pipeline’s default (nanoseconds), exactly like an HTTP write without aprecisionparameter.