diff --git a/README.md b/README.md index 158a0df1..074097e9 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ These protocol versions are supported over both HTTP and TCP. | ------- | ------------------------------------------------------------ | --------------------- | | **1** | Over HTTP it's compatible with InfluxDB Line Protocol (ILP) | All QuestDB versions | | **2** | 64-bit floats sent as binary, adds n-dimensional arrays | 9.0.0+ (2025-07-11) | +| **3** | adds decimals | 9.2.0+ (2025-11-14) | ## Getting Started diff --git a/questdb-rs/src/ingress/mod.md b/questdb-rs/src/ingress/mod.md index 16806795..c3849fdd 100644 --- a/questdb-rs/src/ingress/mod.md +++ b/questdb-rs/src/ingress/mod.md @@ -270,6 +270,21 @@ the configuration string: `protocol_version=2;`. **Note**: QuestDB server version 9.0.0 or later is required for array support. +## Decimal Datatype + +The [`Buffer::column_dec`](Buffer::column_dec) method supports efficient ingestion of decimals using several convenient types: + +- floating-point representation with `&str` +- decimals from the [`bigdecimal`](https://docs.rs/bigdecimal) crate +- decimals from the [`rust_decimal`](https://docs.rs/rust_decimal) crate + +You must use protocol version 3 to ingest decimals. The HTTP transport will +automatically enable it as long as you're connecting to an up-to-date QuestDB +server (version 9.2.0 or later), but with TCP you must explicitly specify it in +the configuration string: `protocol_version=3;`. + +**Note**: QuestDB server version 9.2.0 or later is required for decimal support. + ## Timestamp Column Name The InfluxDB Line Protocol (ILP) does not give a name to the designated timestamp,