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

Support TIMESTAMP_NS, TIMESTAMP_MS & TIMESTAMP_S types #283

Open
JelteF opened this issue Oct 14, 2024 · 4 comments · May be fixed by #534
Open

Support TIMESTAMP_NS, TIMESTAMP_MS & TIMESTAMP_S types #283

JelteF opened this issue Oct 14, 2024 · 4 comments · May be fixed by #534
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@JelteF
Copy link
Collaborator

JelteF commented Oct 14, 2024

DuckDB has timestamp types with different precisions. We should support conversion from/to those types. TIMESTAMP_NS is probably the most challenging, since postgres does not have a native timestamp type with nanosecond precision. It seems better to truncate/round the nanoseconds to microseconds though than to not support them at all.

Related to #228, which tracks adding TIMESTAMP WITH TIME ZONE.

@JelteF JelteF added the enhancement New feature or request label Oct 14, 2024
@JelteF JelteF added this to the 0.2.0 milestone Oct 14, 2024
@JelteF JelteF modified the milestones: 0.2.0, 0.3.0 Nov 6, 2024
@JelteF JelteF added the good first issue Good for newcomers label Nov 19, 2024
@JelteF JelteF modified the milestones: 0.3.0, 0.4.0 Dec 18, 2024
@destrex271
Copy link

Hi @JelteF , Picking this up.

@JelteF
Copy link
Collaborator Author

JelteF commented Jan 14, 2025

@destrex271 are you still expecting to submit a PR for this?

@destrex271
Copy link

@destrex271 are you still expecting to submit a PR for this?

Yes, just got stuck in some other stuff. Will try to raise a pr asap

@destrex271
Copy link

For conversion from lets say TIMESTAMP_MS to TIMESTAMP we can abstract it in the TIMESTAMP type in postgres, but to convert it back to the original duckdb type, it might get a little hard to manage with this approach.

Should we create a new type/datum like TIMESTAMP_MS for pg as well?

@destrex271 destrex271 linked a pull request Jan 15, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants