-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: support optional TIMESTAMP precision #32098
Copy link
Copy link
Closed
Labels
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)E-starterMight be suitable for a starter project for new employees or team members.Might be suitable for a starter project for new employees or team members.X-anchored-telemetryThe issue number is anchored by telemetry references.The issue number is anchored by telemetry references.
Metadata
Metadata
Assignees
Labels
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)E-starterMight be suitable for a starter project for new employees or team members.Might be suitable for a starter project for new employees or team members.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 TIMESTAMP(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.