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

Feature: extract timestamptz with milliseconds #58

Open
dvv opened this issue Dec 28, 2023 · 1 comment
Open

Feature: extract timestamptz with milliseconds #58

dvv opened this issue Dec 28, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed size/sm Size: Small

Comments

@dvv
Copy link

dvv commented Dec 28, 2023

Proposal

Improve reported timestamp precision, as naive_datetime_to_pg_timestamptz() precision ends at seconds.

Additional Links

Here https://github.com/VADOSWARE/pg_idkit/blob/main/src/uuid_v7.rs#L54C31-L54C31 we respect nanos, but here https://github.com/VADOSWARE/pg_idkit/blob/main/src/common.rs#L41 do not.

@t3hmrman
Copy link
Member

t3hmrman commented Dec 28, 2023

Hey @dvv thanks for the idea -- note that the highest resolution of postgres timestamp types is microseconds, so the best we can do here is microseconds, I think!

That said, the nanos should be converted to micro seconds at least rather than leaving it at second granularity.

Would you like to work on this? If you're interested in throwing up a contribution I'd love to have it -- otherwise I can try to get to this soon!

@t3hmrman t3hmrman added enhancement New feature or request size/sm Size: Small help wanted Extra attention is needed labels Dec 28, 2023
@t3hmrman t3hmrman changed the title extract timestamptz with milliseconds feature: extract timestamptz with milliseconds Jun 25, 2024
@t3hmrman t3hmrman changed the title feature: extract timestamptz with milliseconds Feature: extract timestamptz with milliseconds Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed size/sm Size: Small
Projects
None yet
Development

No branches or pull requests

2 participants