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

sql: time datatype #16490

Closed
justinj opened this issue Jun 13, 2017 · 5 comments
Closed

sql: time datatype #16490

justinj opened this issue Jun 13, 2017 · 5 comments
Assignees
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL A-sql-semantics C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Milestone

Comments

@justinj
Copy link
Contributor

justinj commented Jun 13, 2017

Postgres supports a time datatype, which represents a time of day without a date. Hibernate exposes it, it's not clear how much demand there is for it, however.

Postgres docs on time

@justinj justinj added this to the Later milestone Jun 13, 2017
@bdarnell
Copy link
Contributor

Here's a sample real-world table that uses the TIME type from musicbrainz.org

Note that postgres has two time types, TIME WITHOUT TIME ZONE and TIME WITH TIME ZONE. The WITH TIME ZONE variant is said to have "questionable usefulness" in the postgres docs.

@justinj justinj added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-sql-pgcompat Semantic compatibility with PostgreSQL labels Jun 13, 2017
@cuongdo
Copy link
Contributor

cuongdo commented Oct 2, 2017

After chatting with @jordanlewis, this seems like a good starter project for Solon. I'll assign to him once he's added to the GitHub org.

@jordanlewis
Copy link
Member

I suggest that we avoid implementing TIME WITH TIME ZONE. Besides calling that variant "questionably useful", the Postgres docs also recommend that new applications avoid using it.

@awoods187 awoods187 modified the milestones: Later, 1.2 Nov 7, 2017
solongordon added a commit to solongordon/cockroach that referenced this issue Nov 13, 2017
This is an implementation of the PostgreSQL TIME type, which represents
time of day (no date). We store this as an int64 representing
microseconds since midnight.

Note that this commit does not attempt to support any new time formats
beyond what we already support in the time portion of TIMESTAMP. This
means that many formats which Postgres accepts (`04:05`, `040506`,
`04:05 PM`, `allballs`) are not yet handled.

We also do not support TIME WITH TIME ZONE, which the Postgres docs
describe as having "questionable usefulness."

Fixes cockroachdb#16490.

Release note: Added support for TIME data type.
@jordanlewis
Copy link
Member

🎉

@vivekmenezes
Copy link
Contributor

@couchand you have been randomly picked to QA this feature. QA is an independent evaluation of the feature through the eyes of a user. It's probably best that you do not interview the developers involved in creating this feature, nor look at the implementation. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL A-sql-semantics C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

No branches or pull requests

7 participants