From f355d97ae85c960d555c19763d585b4361dffac3 Mon Sep 17 00:00:00 2001 From: "Lei, HUANG" Date: Wed, 13 Nov 2024 21:20:49 -0800 Subject: [PATCH] docs: update timestamp range --- docs/reference/sql/data-types.md | 12 ++++++++---- .../current/reference/sql/data-types.md | 14 +++++++++----- .../version-0.6/reference/sql/data-types.md | 13 +++++++++---- .../version-0.8/reference/sql/data-types.md | 13 +++++++++---- .../version-0.9/reference/sql/data-types.md | 14 +++++++++----- .../version-0.6/reference/sql/data-types.md | 13 +++++++++---- .../version-0.7/reference/sql/data-types.md | 9 +++++---- .../version-0.8/reference/sql/data-types.md | 13 +++++++++---- .../version-0.9/reference/sql/data-types.md | 12 ++++++++---- 9 files changed, 75 insertions(+), 38 deletions(-) diff --git a/docs/reference/sql/data-types.md b/docs/reference/sql/data-types.md index 2235c16cb..05ce6015d 100644 --- a/docs/reference/sql/data-types.md +++ b/docs/reference/sql/data-types.md @@ -60,12 +60,16 @@ Output: | Type Name | Description | Size | |-----------|-------------|------| -| `TimestampSecond` | 64-bit timestamp values with seconds precision | 8 Bytes | -| `TimestampMillisecond` | 64-bit timestamp values with milliseconds precision | 8 Bytes | -| `TimestampMicroSecond` | 64-bit timestamp values with microseconds precision | 8 Bytes | -| `TimestampNanosecond` | 64-bit timestamp values with nanoseconds precision | 8 Bytes | +| `TimestampSecond` | 64-bit timestamp values with seconds precision, range: `[-262144-01-01 00:00:00, +262143-12-31 23:59:59]` | 8 Bytes | +| `TimestampMillisecond` | 64-bit timestamp values with milliseconds precision, range: `[-262144-01-01 00:00:00.000, +262143-12-31 23:59:59.999]` | 8 Bytes | +| `TimestampMicroSecond` | 64-bit timestamp values with microseconds precision, range: `[-262144-01-01 00:00:00.000000, +262143-12-31 23:59:59.999999]` | 8 Bytes | +| `TimestampNanosecond` | 64-bit timestamp values with nanoseconds precision, range: `[1677-09-21 00:12:43.145225, 2262-04-11 23:47:16.854775807]` | 8 Bytes | | `Interval`| Time interval | 4 Bytes for `YearMonth`, 8 Bytes for `DayTime` and 16 Bytes for `MonthDayNano`| +:::tip NOTE +When inserting Timestamp string literals to GreptimeDB using MySQL/PostgreSQL protocol, the value range is limited to '0001-01-01 00:00:00' to '9999-12-31 23:59:59'. +::: + ### Interval Type `Interval` type is used in scenarios where you need to track and manipulate time durations. It can be written using the following verbose syntax: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/data-types.md b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/data-types.md index a477448a4..cf4b82ed8 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/data-types.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/data-types.md @@ -59,11 +59,15 @@ SELECT * FROM decimals; | 类型名称 | 描述 | 大小 | |-----------|-------------|------| -| `TimestampSecond` | 64 位时间戳值,精度为秒 | 8 字节 | -| `TimestampMillisecond` | 64 位时间戳值,毫秒精度 | 8 字节 | -| `TimestampMicroSecond` | 64 位时间戳值,微秒精度 | 8 字节 | -| `TimestampNanosecond` | 64 位时间戳值,纳秒精度 | 8 字节 | -| `Interval`| 时间间隔 | `YearMonth` 占 4 字节,`DayTime` 占 8 字节,`MonthDayNano` 占 16 字节| +| `TimestampSecond` | 64 位时间戳值,精度为秒,范围:`[-262144-01-01 00:00:00, +262143-12-31 23:59:59]` | 8 字节 | +| `TimestampMillisecond` | 64 位时间戳值,毫秒精度,范围:`[-262144-01-01 00:00:00.000, +262143-12-31 23:59:59.999]` | 8 字节 | +| `TimestampMicroSecond` | 64 位时间戳值,微秒精度,范围:`[-262144-01-01 00:00:00.000000, +262143-12-31 23:59:59.999999]` | 8 字节 | +| `TimestampNanosecond` | 64 位时间戳值,纳秒精度,范围: `[1677-09-21 00:12:43.145225, 2262-04-11 23:47:16.854775807]` | 8 字节 | +| `Interval`| 时间间隔 | 对于 `YearMonth`, 使用4字节,对于 `DayTime`, 使用8字节,对于 `MonthDayNano`, 使用16字节 | + +:::tip 注意 +使用 MySQL/PostgreSQL 协议写入时间戳字符串字面量时,值的范围限制为 '0001-01-01 00:00:00' 到 '9999-12-31 23:59:59'。 +::: ### Interval 类型详解 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-0.6/reference/sql/data-types.md b/i18n/zh/docusaurus-plugin-content-docs/version-0.6/reference/sql/data-types.md index af93ece0d..c7ae17969 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-0.6/reference/sql/data-types.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-0.6/reference/sql/data-types.md @@ -59,10 +59,15 @@ SELECT * FROM decimals; | 类型名称 | 描述 | 大小 | |-----------|-------------|------| -| `TimestampSecond` | 64 位时间戳值,精度为秒 | 8 字节 | -| `TimestampMillisecond` | 64 位时间戳值,毫秒精度 | 8 字节 | -| `TimestampMicroSecond` | 64 位时间戳值,微秒精度 | 8 字节 | -| `TimestampNanosecond` | 64 位时间戳值,纳秒精度 | 8 字节 | +| `TimestampSecond` | 64 位时间戳值,精度为秒,范围:`[-262144-01-01 00:00:00, +262143-12-31 23:59:59]` | 8 字节 | +| `TimestampMillisecond` | 64 位时间戳值,毫秒精度,范围:`[-262144-01-01 00:00:00.000, +262143-12-31 23:59:59.999]` | 8 字节 | +| `TimestampMicroSecond` | 64 位时间戳值,微秒精度,范围:`[-262144-01-01 00:00:00.000000, +262143-12-31 23:59:59.999999]` | 8 字节 | +| `TimestampNanosecond` | 64 位时间戳值,纳秒精度,范围: `[1677-09-21 00:12:43.145225, 2262-04-11 23:47:16.854775807]` | 8 字节 | +| `Interval`| 时间间隔 | 对于 `YearMonth`, 使用4字节,对于 `DayTime`, 使用8字节,对于 `MonthDayNano`, 使用16字节 | + +:::tip 注意 +使用 MySQL/PostgreSQL 协议写入时间戳字符串字面量时,值的范围限制为 '0001-01-01 00:00:00' 到 '9999-12-31 23:59:59'。 +::: ## 布尔类型 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-0.8/reference/sql/data-types.md b/i18n/zh/docusaurus-plugin-content-docs/version-0.8/reference/sql/data-types.md index a0380df4f..d8c9ac8fd 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-0.8/reference/sql/data-types.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-0.8/reference/sql/data-types.md @@ -59,10 +59,15 @@ SELECT * FROM decimals; | 类型名称 | 描述 | 大小 | |-----------|-------------|------| -| `TimestampSecond` | 64 位时间戳值,精度为秒 | 8 字节 | -| `TimestampMillisecond` | 64 位时间戳值,毫秒精度 | 8 字节 | -| `TimestampMicroSecond` | 64 位时间戳值,微秒精度 | 8 字节 | -| `TimestampNanosecond` | 64 位时间戳值,纳秒精度 | 8 字节 | +| `TimestampSecond` | 64 位时间戳值,精度为秒,范围:`[-262144-01-01 00:00:00, +262143-12-31 23:59:59]` | 8 字节 | +| `TimestampMillisecond` | 64 位时间戳值,毫秒精度,范围:`[-262144-01-01 00:00:00.000, +262143-12-31 23:59:59.999]` | 8 字节 | +| `TimestampMicroSecond` | 64 位时间戳值,微秒精度,范围:`[-262144-01-01 00:00:00.000000, +262143-12-31 23:59:59.999999]` | 8 字节 | +| `TimestampNanosecond` | 64 位时间戳值,纳秒精度,范围: `[1677-09-21 00:12:43.145225, 2262-04-11 23:47:16.854775807]` | 8 字节 | +| `Interval`| 时间间隔 | 对于 `YearMonth`, 使用4字节,对于 `DayTime`, 使用8字节,对于 `MonthDayNano`, 使用16字节 | + +:::tip 注意 +使用 MySQL/PostgreSQL 协议写入时间戳字符串字面量时,值的范围限制为 '0001-01-01 00:00:00' 到 '9999-12-31 23:59:59'。 +::: ## 布尔类型 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-0.9/reference/sql/data-types.md b/i18n/zh/docusaurus-plugin-content-docs/version-0.9/reference/sql/data-types.md index 88ca75225..4d5046541 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-0.9/reference/sql/data-types.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-0.9/reference/sql/data-types.md @@ -59,11 +59,15 @@ SELECT * FROM decimals; | 类型名称 | 描述 | 大小 | |-----------|-------------|------| -| `TimestampSecond` | 64 位时间戳值,精度为秒 | 8 字节 | -| `TimestampMillisecond` | 64 位时间戳值,毫秒精度 | 8 字节 | -| `TimestampMicroSecond` | 64 位时间戳值,微秒精度 | 8 字节 | -| `TimestampNanosecond` | 64 位时间戳值,纳秒精度 | 8 字节 | -| `Interval`| 时间间隔 | `YearMonth` 占 4 字节,`DayTime` 占 8 字节,`MonthDayNano` 占 16 字节| +| `TimestampSecond` | 64 位时间戳值,精度为秒,范围:`[-262144-01-01 00:00:00, +262143-12-31 23:59:59]` | 8 字节 | +| `TimestampMillisecond` | 64 位时间戳值,毫秒精度,范围:`[-262144-01-01 00:00:00.000, +262143-12-31 23:59:59.999]` | 8 字节 | +| `TimestampMicroSecond` | 64 位时间戳值,微秒精度,范围:`[-262144-01-01 00:00:00.000000, +262143-12-31 23:59:59.999999]` | 8 字节 | +| `TimestampNanosecond` | 64 位时间戳值,纳秒精度,范围: `[1677-09-21 00:12:43.145225, 2262-04-11 23:47:16.854775807]` | 8 字节 | +| `Interval`| 时间间隔 | 对于 `YearMonth`, 使用4字节,对于 `DayTime`, 使用8字节,对于 `MonthDayNano`, 使用16字节 | + +:::tip 注意 +使用 MySQL/PostgreSQL 协议写入时间戳字符串字面量时,值的范围限制为 '0001-01-01 00:00:00' 到 '9999-12-31 23:59:59'。 +::: ### Interval 类型详解 diff --git a/versioned_docs/version-0.6/reference/sql/data-types.md b/versioned_docs/version-0.6/reference/sql/data-types.md index 40330a9a1..a1709923c 100644 --- a/versioned_docs/version-0.6/reference/sql/data-types.md +++ b/versioned_docs/version-0.6/reference/sql/data-types.md @@ -60,10 +60,15 @@ Output: | Type Name | Description | Size | |-----------|-------------|------| -| `TimestampSecond` | 64-bit timestamp values with seconds precision | 8 Bytes | -| `TimestampMillisecond` | 64-bit timestamp values with milliseconds precision | 8 Bytes | -| `TimestampMicroSecond` | 64-bit timestamp values with microseconds precision | 8 Bytes | -| `TimestampNanosecond` | 64-bit timestamp values with nanoseconds precision | 8 Bytes | +| `TimestampSecond` | 64-bit timestamp values with seconds precision, range: `[-262144-01-01 00:00:00, +262143-12-31 23:59:59]` | 8 Bytes | +| `TimestampMillisecond` | 64-bit timestamp values with milliseconds precision, range: `[-262144-01-01 00:00:00.000, +262143-12-31 23:59:59.999]` | 8 Bytes | +| `TimestampMicroSecond` | 64-bit timestamp values with microseconds precision, range: `[-262144-01-01 00:00:00.000000, +262143-12-31 23:59:59.999999]` | 8 Bytes | +| `TimestampNanosecond` | 64-bit timestamp values with nanoseconds precision, range: `[1677-09-21 00:12:43.145225, 2262-04-11 23:47:16.854775807]` | 8 Bytes | +| `Interval`| Time interval | 4 Bytes for `YearMonth`, 8 Bytes for `DayTime` and 16 Bytes for `MonthDayNano`| + +:::tip NOTE +When inserting Timestamp string literals to GreptimeDB using MySQL/PostgreSQL protocol, the value range is limited to '0001-01-01 00:00:00' to '9999-12-31 23:59:59'. +::: ## Boolean Type diff --git a/versioned_docs/version-0.7/reference/sql/data-types.md b/versioned_docs/version-0.7/reference/sql/data-types.md index 40330a9a1..b2197d8d7 100644 --- a/versioned_docs/version-0.7/reference/sql/data-types.md +++ b/versioned_docs/version-0.7/reference/sql/data-types.md @@ -60,10 +60,11 @@ Output: | Type Name | Description | Size | |-----------|-------------|------| -| `TimestampSecond` | 64-bit timestamp values with seconds precision | 8 Bytes | -| `TimestampMillisecond` | 64-bit timestamp values with milliseconds precision | 8 Bytes | -| `TimestampMicroSecond` | 64-bit timestamp values with microseconds precision | 8 Bytes | -| `TimestampNanosecond` | 64-bit timestamp values with nanoseconds precision | 8 Bytes | +| `TimestampSecond` | 64-bit timestamp values with seconds precision, range: `[-262144-01-01 00:00:00, +262143-12-31 23:59:59]` | 8 Bytes | +| `TimestampMillisecond` | 64-bit timestamp values with milliseconds precision, range: `[-262144-01-01 00:00:00.000, +262143-12-31 23:59:59.999]` | 8 Bytes | +| `TimestampMicroSecond` | 64-bit timestamp values with microseconds precision, range: `[-262144-01-01 00:00:00.000000, +262143-12-31 23:59:59.999999]` | 8 Bytes | +| `TimestampNanosecond` | 64-bit timestamp values with nanoseconds precision, range: `[1677-09-21 00:12:43.145225, 2262-04-11 23:47:16.854775807]` | 8 Bytes | +| `Interval`| Time interval | 4 Bytes for `YearMonth`, 8 Bytes for `DayTime` and 16 Bytes for `MonthDayNano`| ## Boolean Type diff --git a/versioned_docs/version-0.8/reference/sql/data-types.md b/versioned_docs/version-0.8/reference/sql/data-types.md index 573643bd7..05a19ec74 100644 --- a/versioned_docs/version-0.8/reference/sql/data-types.md +++ b/versioned_docs/version-0.8/reference/sql/data-types.md @@ -60,10 +60,15 @@ Output: | Type Name | Description | Size | |-----------|-------------|------| -| `TimestampSecond` | 64-bit timestamp values with seconds precision | 8 Bytes | -| `TimestampMillisecond` | 64-bit timestamp values with milliseconds precision | 8 Bytes | -| `TimestampMicroSecond` | 64-bit timestamp values with microseconds precision | 8 Bytes | -| `TimestampNanosecond` | 64-bit timestamp values with nanoseconds precision | 8 Bytes | +| `TimestampSecond` | 64-bit timestamp values with seconds precision, range: `[-262144-01-01 00:00:00, +262143-12-31 23:59:59]` | 8 Bytes | +| `TimestampMillisecond` | 64-bit timestamp values with milliseconds precision, range: `[-262144-01-01 00:00:00.000, +262143-12-31 23:59:59.999]` | 8 Bytes | +| `TimestampMicroSecond` | 64-bit timestamp values with microseconds precision, range: `[-262144-01-01 00:00:00.000000, +262143-12-31 23:59:59.999999]` | 8 Bytes | +| `TimestampNanosecond` | 64-bit timestamp values with nanoseconds precision, range: `[1677-09-21 00:12:43.145225, 2262-04-11 23:47:16.854775807]` | 8 Bytes | +| `Interval`| Time interval | 4 Bytes for `YearMonth`, 8 Bytes for `DayTime` and 16 Bytes for `MonthDayNano`| + +:::tip NOTE +When inserting Timestamp string literals to GreptimeDB using MySQL/PostgreSQL protocol, the value range is limited to '0001-01-01 00:00:00' to '9999-12-31 23:59:59'. +::: ## Boolean Type diff --git a/versioned_docs/version-0.9/reference/sql/data-types.md b/versioned_docs/version-0.9/reference/sql/data-types.md index fbb9658ab..d06dc3faa 100644 --- a/versioned_docs/version-0.9/reference/sql/data-types.md +++ b/versioned_docs/version-0.9/reference/sql/data-types.md @@ -60,12 +60,16 @@ Output: | Type Name | Description | Size | |-----------|-------------|------| -| `TimestampSecond` | 64-bit timestamp values with seconds precision | 8 Bytes | -| `TimestampMillisecond` | 64-bit timestamp values with milliseconds precision | 8 Bytes | -| `TimestampMicroSecond` | 64-bit timestamp values with microseconds precision | 8 Bytes | -| `TimestampNanosecond` | 64-bit timestamp values with nanoseconds precision | 8 Bytes | +| `TimestampSecond` | 64-bit timestamp values with seconds precision, range: `[-262144-01-01 00:00:00, +262143-12-31 23:59:59]` | 8 Bytes | +| `TimestampMillisecond` | 64-bit timestamp values with milliseconds precision, range: `[-262144-01-01 00:00:00.000, +262143-12-31 23:59:59.999]` | 8 Bytes | +| `TimestampMicroSecond` | 64-bit timestamp values with microseconds precision, range: `[-262144-01-01 00:00:00.000000, +262143-12-31 23:59:59.999999]` | 8 Bytes | +| `TimestampNanosecond` | 64-bit timestamp values with nanoseconds precision, range: `[1677-09-21 00:12:43.145225, 2262-04-11 23:47:16.854775807]` | 8 Bytes | | `Interval`| Time interval | 4 Bytes for `YearMonth`, 8 Bytes for `DayTime` and 16 Bytes for `MonthDayNano`| +:::tip NOTE +When inserting Timestamp string literals to GreptimeDB using MySQL/PostgreSQL protocol, the value range is limited to '0001-01-01 00:00:00' to '9999-12-31 23:59:59'. +::: + ### Interval Type `Interval` type is used in scenarios where you need to track and manipulate time durations. It can be written using the following verbose syntax: