mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-05 21:02:58 +00:00
* fix/pg-timestamp-diff: ### Add Support for `Duration` Type in PostgreSQL Encoding - **Enhanced `encode_value` Functionality**: Updated `src/servers/src/postgres/types.rs` to support encoding of `Value::Duration` using `PgInterval`. - **Implemented `Duration` Conversion**: Added conversion logic from `Duration` to `PgInterval` in `src/servers/src/postgres/types/interval.rs`. - **Added Unit Tests**: Introduced tests for `Duration` to `PgInterval` conversion in `src/servers/src/postgres/types/interval.rs`. - **Updated SQL Test Cases**: Modified `tests/cases/standalone/common/types/timestamp/timestamp.sql` and `timestamp.result` to include tests for timestamp subtraction using PostgreSQL protocol. * fix: overflow * fix/pg-timestamp-diff: Update `timestamp.sql` to ensure newline consistency - Modified `timestamp.sql` to add a newline at the end of the file for consistency. * fix/pg-timestamp-diff: ### Add Documentation for Month Approximation in Interval Calculation - **File Modified**: `src/servers/src/postgres/types/interval.rs` - **Key Change**: Added a comment explaining the approximation of one month as 30.44 days in the interval calculations.