-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: support optional TIME precision #32565
Copy link
Copy link
Closed
Labels
A-sql-datatypesSQL column types usable in table descriptors.SQL column types usable in table descriptors.A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)X-anchored-telemetryThe issue number is anchored by telemetry references.The issue number is anchored by telemetry references.
Metadata
Metadata
Assignees
Labels
A-sql-datatypesSQL column types usable in table descriptors.SQL column types usable in table descriptors.A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)X-anchored-telemetryThe issue number is anchored by telemetry references.The issue number is anchored by telemetry references.
Is your feature request related to a problem? Please describe.
CREATE TABLE t(x TIME(6))should workSee: https://www.postgresql.org/docs/11/static/datatype-datetime.html#DATATYPE-TIMEZONES
Describe the solution you'd like
MVP: An optional precision of 6 should be recognized and ignored (this is the default in CockroachDB)
Optionally: support for other precisions than 6.
Workaround
If the desired precision is 6, then the precision can be omitted altogether to obtain equivalent behavior.