-
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: incomplete desugaring of type keywords into type names #24686
Comments
"char"
is incorrectly defined
I don't really see the problem here - we alias We also now support naming types in quotes, but only the ones that aren't recognized by the SQL standard. This is the same as PG as well. For example:
|
My point is that the test |
No, the input syntax is the INPUT literal
|
Welp, that is then again a sign that the pg docs are wrong. Thanks for pointing it out. The situation I am working with is that our docs do not (yet) reflect this properly and the explanation is subtle. I'll need to investigate more before I can have a chat with Lauren and explain what's going on. |
All right I dug into the pg source code and it so happens that both of us were right, although neither of us had the right explanation for it :) Where I was right:
Where you were right:
Where we were both missing something:
So the input syntax |
"char"
is incorrectly defined28690: sql: fix the handling of integer types r=knz a=knz Addresses a large chunk of #26925. Fixes #25098. Informs #24686. Prior to this patch, CockroachDB maintained an unnecessary distinction between "INT" and "INTEGER", between "BIGINT" and "INT8", etc. This distinction is unnecessary but also costly, as we were paying the price of a "name" attribute in coltypes.TInt, with a string comparison and hash table lookup on every use of the type. What really matters is that the type shows up properly in introspection; this has already been ensured by various OID-to-pgcatalog mappings and the recently introduced `InformationSchemaTypeName()`. Any distinction beyond that is unnecessary and can be dropped from the implementation. Release note: None Co-authored-by: Raphael 'kena' Poss <[email protected]>
This has been completed (except for NCHAR which is just plainly not supported). Nothing actionable any more here. |
Noticed while reviewing cockroachdb/docs#2887.
The following PR #18530 introduced support for the special, internal-only type in PostgreSQL called
"char"
.This is incomplete, see the comment below for details.
The text was updated successfully, but these errors were encountered: