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

Exclude information_schema tables from dm by default if schema = NULL #1130

Closed

Conversation

noamross
Copy link

Addressing #366. Does not address case of MSSQL using dbname instead of schema (yet), as I'm unfamiliar with how that differs.

Copy link
Collaborator

@krlmlr krlmlr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@@ -254,6 +254,13 @@ filter_dm_meta <- function(dm_meta, catalog = NULL, schema = NULL) {
table_constraints <- table_constraints %>% filter(table_schema %in% !!schema)
key_column_usage <- key_column_usage %>% filter(table_schema %in% !!schema)
constraint_column_usage <- constraint_column_usage %>% filter(table_schema %in% !!schema)
} else {
schemata <- schemata %>% filter(schema_name != "information_schema")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need tolower() here and everywhere?

@krlmlr
Copy link
Collaborator

krlmlr commented Jun 21, 2022

I'm sorry, I was confused.

#1123 now uses only objects from the current database if DBI::dbConnect() has been called with the dbname argument. This is consistent with the current behavior. We'll want to find a way to query all schemas even in that case, need to revisit the semantics of schema = NA vs. schema = NULL .

@krlmlr
Copy link
Collaborator

krlmlr commented Jun 21, 2022

schema = NA done in 78aa189, but no tests.

Closing for now, I believe we want information_schema with schema = NA .

@krlmlr krlmlr closed this Jun 21, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants