Skip to content

Add COMMENT ON support for database objects#6112

Open
glommer wants to merge 1 commit intotursodatabase:mainfrom
glommer:comments
Open

Add COMMENT ON support for database objects#6112
glommer wants to merge 1 commit intotursodatabase:mainfrom
glommer:comments

Conversation

@glommer
Copy link
Contributor

@glommer glommer commented Mar 23, 2026

Implement the COMMENT ON statement to attach human-readable descriptions to tables, columns, indexes, views, and types. Comments are stored in a lazily-created __turso_internal_comments table. IS NULL removes a previously set comment.

Add PRAGMA comment_list with optional object_name filtering. .schema now formats CREATE TABLE as multi-line (one column per line) and injects inline -- comments when present. .dump emits COMMENT ON statements instead of raw internal table DDL so comments survive dump/restore.

Move cmdlineshell.sqltest to turso-tests/ because .schema now produces multi-line CREATE TABLE output which diverges from sqlite3 single-line format. Move comment_on.sqltest to turso-tests/ since COMMENT ON is a Turso extension not present in SQLite.

Copy link

@turso-bot turso-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review @LeMikaelF

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 23, 2026

Merging this PR will not alter performance

✅ 311 untouched benchmarks
⏩ 105 skipped benchmarks1


Comparing glommer:comments (3076915) with main (8425cba)

Open in CodSpeed

Footnotes

  1. 105 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@glommer glommer force-pushed the comments branch 3 times, most recently from 6bc6137 to 80e240b Compare March 24, 2026 17:13
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant