-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: support optional INTERVAL precision #32564
Labels
A-sql-datatypes
SQL column types usable in table descriptors.
A-sql-pgcompat
Semantic compatibility with PostgreSQL
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
X-anchored-telemetry
The issue number is anchored by telemetry references.
Comments
knz
added
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
A-sql-pgcompat
Semantic compatibility with PostgreSQL
A-sql-datatypes
SQL column types usable in table descriptors.
X-anchored-telemetry
The issue number is anchored by telemetry references.
labels
Nov 22, 2018
jordanlewis
added a commit
to jordanlewis/cockroach
that referenced
this issue
Oct 5, 2019
This commit lets the parser accept the type INTERVAL(6) as a no-op equivalent to INTERVAL. This is safe and equivalent to what we do for INTERVAL on its own. Updates cockroachdb#32564. Release justification: low-risk compatibility fix Release note (sql change): support interval precision syntax when the requested precision is exactly 6, as a syntactic sugar for intervals without a precision specified.
jordanlewis
added a commit
to jordanlewis/cockroach
that referenced
this issue
Oct 8, 2019
This commit lets the parser accept the type INTERVAL(6) as a no-op equivalent to INTERVAL. This is safe and equivalent to what we do for INTERVAL on its own. Updates cockroachdb#32564. Release justification: low-risk compatibility fix Release note (sql change): support interval precision syntax when the requested precision is exactly 6, as a syntactic sugar for intervals without a precision specified.
jordanlewis
added a commit
to jordanlewis/cockroach
that referenced
this issue
Oct 8, 2019
This commit lets the parser accept the type INTERVAL(6) as a no-op equivalent to INTERVAL. This is safe and equivalent to what we do for INTERVAL on its own. Updates cockroachdb#32564. Release justification: low-risk compatibility fix Release note (sql change): support interval precision syntax when the requested precision is exactly 6, as a syntactic sugar for intervals without a precision specified.
jordanlewis
added a commit
to jordanlewis/cockroach
that referenced
this issue
Oct 8, 2019
This commit lets the parser accept the type INTERVAL(6) as a no-op equivalent to INTERVAL. This is safe and equivalent to what we do for INTERVAL on its own. Updates cockroachdb#32564. Release justification: low-risk compatibility fix Release note (sql change): support interval precision syntax when the requested precision is exactly 6, as a syntactic sugar for intervals without a precision specified.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-sql-datatypes
SQL column types usable in table descriptors.
A-sql-pgcompat
Semantic compatibility with PostgreSQL
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
X-anchored-telemetry
The issue number is anchored by telemetry references.
Is your feature request related to a problem? Please describe.
CREATE TABLE t(x INTERVAL(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
Optionally: support for other precisions than 6, for example 9 as is currently done in CockroachDB.
Workaround
If the desired precision is 9, then the precision can be omitted altogether to obtain equivalent behavior.
The text was updated successfully, but these errors were encountered: