Skip to content
This repository was archived by the owner on Dec 29, 2025. It is now read-only.
This repository was archived by the owner on Dec 29, 2025. It is now read-only.

Losing microseconds #106

@gallyamow

Description

@gallyamow

Hi. I have a trouble with losing microseconds on DateTime64(6, ...) columns if row was written over clickhouse_fdw.

Example

CREATE TABLE signals.test
(
    `timestamp` DateTime64(6, 'Asia/Istanbul'),
    `from` String
)
ENGINE = TinyLog;

I wrote there two rows, one directly from clickhouse, the second from postgres over clickhouse_fwd

This query was executed in clickhouse-client:

INSERT INTO signals.test VALUES ('2019-01-01 00:00:00.123456', 'written_by_clickhouse');

This one in postgresql:

INSERT INTO signals.test VALUES ('2019-01-01 00:00:00.123456', 'written_by_postgres');

Result of query
SELECT * FROM signals.test
is

   ┌──────────────────timestamp─┬─from──────────────────┐
1. │ 2019-01-01 00:00:00.123456 │ written_by_clickhouse │
2. │ 2019-01-01 00:00:00.000000 │ written_by_postgres   │
   └────────────────────────────┴───────────────────────┘

So, there is losing microsecond part of date.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions