Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Losing microseconds #106

Open
gallyamow opened this issue Jul 29, 2024 · 0 comments
Open

Losing microseconds #106

gallyamow opened this issue Jul 29, 2024 · 0 comments

Comments

@gallyamow
Copy link

gallyamow commented Jul 29, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant