Do not include external schemas in search_path#120
Merged
jklukas merged 3 commits intoMay 23, 2017
Conversation
Member
|
lgtm. I'll try to run the tests against real Redshift. |
jklukas
reviewed
May 22, 2017
| WHERE nspname !~ '^pg_' | ||
| AND nspname <> 'information_schema' | ||
| AND n.oid NOT IN | ||
| (SELECT esoid FROM pg_catalog.pg_external_schema) |
Member
There was a problem hiding this comment.
Tests against Redshift were failing for this. It looks like schema_names was returning an empty string every time. Pushed this change, moving to a check based on membership in an array populated from a subquery.
Member
|
I can confirm that this is now passing tests against Redshift with d370d0a @mjschultz - If the extra commit here looks good to you, I'll go ahead and merge. |
Contributor
Author
|
lgtm with the new commit. That's what I had used originally. I thought the other form was a bit cleaner but I guess if it doesn't work quite right this is the one to go with. |
Member
|
Thanks for submitting this, @mjschultz! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Amazon's new Redshift Spectrum makes use of external schemas but you cannot set the
search_pathto include external schemas which breaks reflection. This prevents any external schemas from being added to thesearch_path.Todos