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

Cast ULID to timestamptz #55

Open
codercms opened this issue Dec 18, 2024 · 0 comments
Open

Cast ULID to timestamptz #55

codercms opened this issue Dec 18, 2024 · 0 comments
Labels
C: cast Context: Cast D1: easy Difficulty: Easy to implement T: feature Type: Feature request U3: maybe Urgency: Maybe Z: help wanted Z: Need help

Comments

@codercms
Copy link

It would be great to have an ability to cast ULID to timestamptz (timestamp with time zone) directly.
Using timestamp (without time zone) is considered to be a bad practice - https://wiki.postgresql.org/wiki/Don%27t_Do_This#Don.27t_use_timestamp_.28without_time_zone.29

Additionally, TimescaleDB also recommends using the timestamptz type, as mentioned in their hypertables documentation:

Hypertables are designed for real-time analytics, they are PostgreSQL tables that automatically partition your data by time. Typically, you partition hypertables on columns that hold time values. These partitioning columns can be of the timestamptz, date, or integer types. While timestamp is also supported, best practice is to use timestamptz.

@pksunkara pksunkara added T: feature Type: Feature request Z: help wanted Z: Need help D1: easy Difficulty: Easy to implement U3: maybe Urgency: Maybe C: cast Context: Cast labels Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: cast Context: Cast D1: easy Difficulty: Easy to implement T: feature Type: Feature request U3: maybe Urgency: Maybe Z: help wanted Z: Need help
Projects
None yet
Development

No branches or pull requests

2 participants