-
Notifications
You must be signed in to change notification settings - Fork 98
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
Fix upgrade script to resolve MVU issue from 15.11 #3465
Fix upgrade script to resolve MVU issue from 15.11 #3465
Conversation
Signed-off-by: Anikait Agrawal <[email protected]>
Pull Request Test Coverage Report for Build 13195831508Details
💛 - Coveralls |
@@ -6719,7 +6719,7 @@ CREATE OR REPLACE VIEW information_schema_tsql.columns_internal AS | |||
CAST(ext.orig_name AS sys.nvarchar(128)) AS "TABLE_SCHEMA", | |||
CAST( | |||
COALESCE( | |||
(SELECT string_agg( | |||
(SELECT pg_catalog.string_agg( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should fix the issue. Although I think it would be better to add PG_CATALOG for all the string_agg even if it is not invoked from inside COALESCE function as that would be a good coding practice. There are such occurrences in other upgrade scripts where we call string_agg instead of PG_CATALOG.string_agg which are not invoked from inside COALESCE function. I think we should update that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, we have verified locally as well as in pre-prod upgrades and this change fixes the issue, as far as other occurences are concerned we have closely verified that either of the 2 definitions would work correctly with no differences and for prepending all such occurences there is a long list of previous such function calls which will not affect us but we can update them as a part of future changes
@@ -6719,7 +6719,7 @@ CREATE OR REPLACE VIEW information_schema_tsql.columns_internal AS | |||
CAST(ext.orig_name AS sys.nvarchar(128)) AS "TABLE_SCHEMA", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's update the search path to sys, pg_catalog, public
to be consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs more investigation as to why we have different search paths, will take this up later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's update the description of the PR as this is not only true for 15.11 but from previous versions as well.
9f7c2e9
into
babelfish-for-postgresql:BABEL_5_X_DEV
…tgresql#3465) Fix MVU issue from 15.11 by fixing upgrade script `babelfishpg_tsql--4.2.0--4.3.0.sql` to prepend `PG_CATALOG` schema on string_agg function call. Task: BABEL-5595 Signed-off-by: Anikait Agrawal <[email protected]>
Fix MVU issue from 15.11 by fixing upgrade script `babelfishpg_tsql--4.2.0--4.3.0.sql` to prepend `PG_CATALOG` schema on string_agg function call. Task: BABEL-5595 Signed-off-by: Anikait Agrawal <[email protected]>
…tgresql#3465) Fix MVU issue from 15.11 by fixing upgrade script `babelfishpg_tsql--4.2.0--4.3.0.sql` to prepend `PG_CATALOG` schema on string_agg function call. Task: BABEL-5595 Signed-off-by: Anikait Agrawal <[email protected]>
Fix MVU issue from 15.11 by fixing upgrade script `babelfishpg_tsql--4.2.0--4.3.0.sql` to prepend `PG_CATALOG` schema on string_agg function call. Task: BABEL-5595 Signed-off-by: Anikait Agrawal <[email protected]>
Description
babelfishpg_tsql--4.2.0--4.3.0.sql
to prependPG_CATALOG
schema on string_agg function callIssues Resolved
BABEL-5595
Authored-by: Anikait Agrawal [email protected]
Signed-off-by: Anikait Agrawal [email protected]
Test Scenarios Covered
Use case based -
Boundary conditions -
Arbitrary inputs -
Negative test cases -
Minor version upgrade tests -
Major version upgrade tests -
Performance tests -
Tooling impact -
Client tests -
Check List
By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.