Skip to content

Expose table and column comments in metadata responses #74

Description

@debba

Context

Core support is being added in TabularisDB/tabularis#764 for TabularisDB/tabularis#722. The runtime now accepts an optional comment: string | null in get_tables and get_columns results.

The built-in PostgreSQL driver is covered by the core PR, but the separately distributed PostgreSQL plugin needs parity. PostgreSQL stores table and column descriptions in pg_description.

Requested changes

  • Update get_tables to return table descriptions as optional comment values.
  • Update get_columns and row_to_table_column to return column descriptions as optional comment values.
  • Join pg_description through the schema-qualified pg_class / pg_attribute objects and constrain classoid = 'pg_class'::regclass:
    • table: objsubid = 0
    • column: objsubid = pg_attribute.attnum
  • Return null or omit the property when no comment exists.
  • Add integration tests for comments containing apostrophes, Unicode, and newlines, plus objects without comments.
  • When the currently stubbed bulk metadata methods are implemented, ensure they return the same column comment metadata.

Compatibility

This is additive: no manifest/capability change or minimum runtime bump is required. Older Tabularis runtimes ignore unknown JSON fields, while newer runtimes continue to accept payloads without comment.

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions