Skip to content

sql: Complete the information_schema by adding empty table definitions #8675

@nvb

Description

@nvb

#8119 introduced the framework for creating virtual schemas, and specifically, the information_schema. Subsequently, a group PRs added what was deemed to be the most immediately critical set of tables. However, the specification for the information_schema is extensive, and there are a number of other tables which can be added with relative ease. The set of all information_schema tables is:

  • character_sets
  • collations
  • collation_character_set_applicability
  • columns
  • column_privileges
  • constraint_column_usage
  • engines
  • events
  • files
  • global_status
  • session_statuss
  • global_variables
  • session_variables
  • key_column_usage
  • optimizer_trace
  • parameters
  • partitions
  • plugins
  • processlist
  • profiling
  • referential_constraints
  • routines
  • schemata
  • schema_privileges
  • sequences
  • statistics
  • tables
  • tablespaces
  • table_constraints
  • table_privileges
  • triggers
  • user_privileges
  • views

The process for adding a new information_schema table is:

  1. create a new virtualSchemaTable variable with a table schema definition
  2. construct a population function implementation to populate this schema on demand
  3. add the variable to the information_schema's table list
  4. add necessary testing to testdata/information_schema

Helpful sources:

Metadata

Metadata

Assignees

Labels

A-sql-pgcompatSemantic compatibility with PostgreSQLA-sql-vtablesVirtual tables - pg_catalog, information_schema etcC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)E-easyEasy issue to tackle, requires little or no CockroachDB experienceT-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)X-anchored-telemetryThe issue number is anchored by telemetry references.good first issuehelp wantedHelp is requested / needed by the one who filed the issue to fix it.meta-issueContains a list of several other issues.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions