Skip to content
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

Wrong column type in sys.sql_modules #2604

Conversation

shalinilohia50
Copy link
Contributor

@shalinilohia50 shalinilohia50 commented May 22, 2024

Description

Currently, definition column in the view sys.sql_modules stores upto 4000 characters. SSMS scripting uses sys.sql_modules view to show the definition of the procedure, and the procedure definition is truncated to 4000 characters if the actual procedure definition is more than 4K.

To avoid this incorrect definition, We can directly use sys.nvarchar and there is no need to specify the tymod of 4000 in case of sys.nvarchar for the definition column i.e., sys.nvarchar(4000).

Fixed the definition column for the views which should use nvarchar(max): sql_modules, system_sql_modules, all_sql_modules.

Issues Resolved

Task: BABEL-4870
Signed-off-by: Shalini Lohia [email protected]

Test Scenarios Covered

  • Use case based - Added test in DDL test framework. Also, testing using SSMS.

  • Boundary conditions -

  • Arbitrary inputs -

  • Negative test cases -

  • Minor version upgrade tests -

  • Major version upgrade tests -

  • Performance tests -

  • Tooling impact -

  • Client tests -

@shardgupta shardgupta merged commit 508180f into babelfish-for-postgresql:BABEL_2_X_DEV May 23, 2024
29 checks passed
@shardgupta shardgupta deleted the jira-sql-module-2x branch May 23, 2024 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants