-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe 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 |
||
CASE | ||
WHEN option LIKE 'bbf_original_rel_name=%' THEN substring(option, 23 /* prefix length */) | ||
ELSE NULL | ||
|
@@ -6730,7 +6730,7 @@ CREATE OR REPLACE VIEW information_schema_tsql.columns_internal AS | |
|
||
CAST( | ||
COALESCE( | ||
(SELECT string_agg( | ||
(SELECT pg_catalog.string_agg( | ||
CASE | ||
WHEN option LIKE 'bbf_original_name=%' THEN substring(option, 19 /* prefix length */) | ||
ELSE NULL | ||
|
@@ -6836,7 +6836,7 @@ CREATE OR REPLACE VIEW information_schema_tsql.tables AS | |
CAST(ext.orig_name AS sys.nvarchar(128)) AS "TABLE_SCHEMA", | ||
CAST( | ||
COALESCE( | ||
(SELECT string_agg( | ||
(SELECT pg_catalog.string_agg( | ||
CASE | ||
WHEN option LIKE 'bbf_original_rel_name=%' THEN substring(option, 23) | ||
ELSE NULL | ||
|
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