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

sql: provide table comments for virtual tables #34764

Merged
merged 1 commit into from
Mar 9, 2019

Commits on Mar 9, 2019

  1. sql: provide table comments on virtual tables

    This patch adds a `comment` to `virtualSchemaTable` and exposes it
    through a new virtual table `crdb_internal.predefined_comments`.
    
    This is then used by `pg_catalog.pg_description` to expose comments on
    virtual tables alongside those of real tables. This way
    `obj_description()` works on virtual tables too.
    
    Finally it modifies `SHOW TABLES WITH COMMENT` to use `pg_description`
    and expose the table comments.
    
    Release note (sql change): CockroachDB now provides usable comments
    with optional documentation URLs for the virtual tables in
    `pg_catalog`, `information_schema` and `crdb_internal`. Use `SHOW
    TABLES [FROM ...] WITH COMMENT` to read. Note that `crdb_internal`
    tables remain an experimental feature subject to change without
    notice.
    hueypark authored and knz committed Mar 9, 2019
    Configuration menu
    Copy the full SHA
    336a9fa View commit details
    Browse the repository at this point in the history