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
Context
Core support is being added in TabularisDB/tabularis#764 for TabularisDB/tabularis#722. The runtime now accepts an optional
comment: string | nullinget_tablesandget_columnsresults.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
get_tablesto return table descriptions as optionalcommentvalues.get_columnsandrow_to_table_columnto return column descriptions as optionalcommentvalues.pg_descriptionthrough the schema-qualifiedpg_class/pg_attributeobjects and constrainclassoid = 'pg_class'::regclass:objsubid = 0objsubid = pg_attribute.attnumnullor omit the property when no comment exists.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
COMMENT: https://www.postgresql.org/docs/current/sql-comment.html