-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sqlsmith: handle user-defined schemas #54961
Copy link
Copy link
Closed
Labels
A-testingTesting tools and infrastructureTesting tools and infrastructureC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Description
sqlsmith only looks for tables in the public schema. With the the 20.2 release, it should also look in user-defined schemas.
See
cockroach/pkg/internal/sqlsmith/schema.go
Lines 211 to 228 in 991893b
| 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 | |
| `) |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-testingTesting tools and infrastructureTesting tools and infrastructureC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)