Skip to content

sqlsmith: handle user-defined schemas  #54961

@rafiss

Description

@rafiss

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
`)

Metadata

Metadata

Assignees

Labels

A-testingTesting tools and infrastructureC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions