-
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: cast to name
should truncate to at most 63 characters
#107895
Comments
AFAICT our documentation does not mention the Footnotes |
Moving back to triage to remove the |
The NAME type is known to have different behavior in CRDB than in postgres, in that casting to name truncates a string to 63 characters in postgres, but not in CRDB, causing sqlsmith test failures. For backwards compatibility, CRDB behavior is not being changed to match postgres, at least for now. The fix it to prevent sqlsmith tests which use postgres mode (which implies it is comparing CRDB results with postgres) from generating NAME as a random type for testing. Fixes: cockroachdb#107895 Release note: None
108811: sqlsmith: disable NAME type in postgres mode r=michae2 a=msirek The NAME type is known to have different behavior in CRDB than in postgres, in that casting to name truncates a string to 63 characters in postgres, but not in CRDB, causing sqlsmith test failures. For backwards compatibility, CRDB behavior is not being changed to match postgres, at least for now. The fix is to prevent sqlsmith tests which use postgres mode (which implies it is comparing CRDB results with postgres) from generating NAME as a random type for testing. Fixes: #107895 Release note: None Co-authored-by: Mark Sirek <[email protected]>
The NAME type is known to have different behavior in CRDB than in postgres, in that casting to name truncates a string to 63 characters in postgres, but not in CRDB, causing sqlsmith test failures. For backwards compatibility, CRDB behavior is not being changed to match postgres, at least for now. The fix is to prevent sqlsmith tests which use postgres mode (which implies it is comparing CRDB results with postgres) from generating NAME as a random type for testing. Fixes: #107895 Release note: None
The NAME type is known to have different behavior in CRDB than in postgres, in that casting to name truncates a string to 63 characters in postgres, but not in CRDB, causing sqlsmith test failures. For backwards compatibility, CRDB behavior is not being changed to match postgres, at least for now. The fix is to prevent sqlsmith tests which use postgres mode (which implies it is comparing CRDB results with postgres) from generating NAME as a random type for testing. Fixes: #107895 Release note: None
Postgres has the following behavior:
CockroachDB does not:
This should match Postgres. I'm not sure how to think of backwards compatibility here (though regardless, it should be documented as a backwards-incompatible change).
Discovered through randomized testing: #82867 (comment)
Jira issue: CRDB-30248
The text was updated successfully, but these errors were encountered: