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

TIMESTAMP WITH ZONE #19

Open
michaelkimchi opened this issue Feb 25, 2021 · 5 comments
Open

TIMESTAMP WITH ZONE #19

michaelkimchi opened this issue Feb 25, 2021 · 5 comments

Comments

@michaelkimchi
Copy link

Very minor thing but I wonder why we would want to store TIMESTAMP WITH ZONE, it is probably better not to store ZONE and the code is using Utc::now anyway.

https://github.com/jbr/async-sqlx-session/blob/main/src/pg.rs#L157

@michaelkimchi
Copy link
Author

Hi, is this repo still active, I would like to do some other dependencies update/making changes, etc..

@jbr
Copy link
Owner

jbr commented Jun 1, 2021

Yes, this repo is still active. I somehow was not watching it, so I did not see notifications. I don't know how that happened, but it's resolved now.

As far as TIMESTAMP WITH ZONE, I don't exactly recall why I chose that. If your sessions table is large enough that the storage size is relevant, I imagine there's additional db tuning we'd want to look at.

@michaelkimchi
Copy link
Author

Thanks for replying @jbr

Yeah not critical, just that I try to avoid TIMESTAMP WITH ZONE wherever possible, it is all headache.

@jbr
Copy link
Owner

jbr commented Jun 2, 2021

This makes sense. I'd be amenable to making this change, but we'd need to think through how to do migrations and track table versions, which was something I put off "for later"

@michaelkimchi
Copy link
Author

Ah I was thinking just keep TIMESTAMP instead TIMESTAMP WITH ZONE so the changes should be minimal?

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

2 participants