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

sqlsmith: handle user-defined schemas #54961

Closed
rafiss opened this issue Sep 29, 2020 · 0 comments · Fixed by #56395
Closed

sqlsmith: handle user-defined schemas #54961

rafiss opened this issue Sep 29, 2020 · 0 comments · Fixed by #56395
Assignees
Labels
A-testing Testing tools and infrastructure C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@rafiss
Copy link
Collaborator

rafiss commented Sep 29, 2020

sqlsmith only looks for tables in the public schema. With the the 20.2 release, it should also look in user-defined schemas.

See

func (s *Smither) extractTables() ([]*tableRef, error) {
rows, err := s.db.Query(`
SELECT
table_catalog,
table_schema,
table_name,
column_name,
crdb_sql_type,
generation_expression != '' AS computed,
is_nullable = 'YES' AS nullable,
is_hidden = 'YES' AS hidden
FROM
information_schema.columns
WHERE
table_schema = 'public'
ORDER BY
table_catalog, table_schema, table_name
`)

@rafiss rafiss added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-testing Testing tools and infrastructure labels Sep 29, 2020
@craig craig bot closed this as completed in 13ce0e8 Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testing Testing tools and infrastructure C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants