feat: add --verbose and --skip-partitions flags for doc/out commands#802
Draft
patkujawa-wf wants to merge 1 commit intok1LoW:mainfrom
Draft
feat: add --verbose and --skip-partitions flags for doc/out commands#802patkujawa-wf wants to merge 1 commit intok1LoW:mainfrom
patkujawa-wf wants to merge 1 commit intok1LoW:mainfrom
Conversation
- Add --verbose/-v flag to show progress with elapsed timestamps - Add --skip-partitions flag to skip PostgreSQL table partitions - Skip relations referencing excluded partition tables - Mask passwords in DSN when verbose logging - Add verbose logging to datasource connection and postgres driver These flags help diagnose slow database analysis (especially with partitioned tables) and reduce unnecessary partition scanning.
patkujawa-wf
commented
Feb 3, 2026
Comment on lines
+728
to
+743
| SELECT | ||
| cls.oid AS oid, | ||
| cls.relname AS table_name, | ||
| CASE | ||
| WHEN cls.relkind IN ('r', 'p') THEN 'BASE TABLE' | ||
| WHEN cls.relkind = 'v' THEN 'VIEW' | ||
| WHEN cls.relkind = 'm' THEN 'MATERIALIZED VIEW' | ||
| WHEN cls.relkind = 'f' THEN 'FOREIGN TABLE' | ||
| END AS table_type, | ||
| ns.nspname AS table_schema, | ||
| descr.description AS table_comment | ||
| FROM pg_class AS cls | ||
| INNER JOIN pg_namespace AS ns ON cls.relnamespace = ns.oid | ||
| LEFT JOIN pg_description AS descr ON cls.oid = descr.objoid AND descr.objsubid = 0 | ||
| WHERE ns.nspname NOT IN ('pg_catalog', 'information_schema') | ||
| AND cls.relkind IN ('r', 'p', 'v', 'f', 'm')` |
Author
There was a problem hiding this comment.
This is straight copy, with ORDER BY oid added later
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOTE: I used Claude Code for these changes.
If this is desirable, I'm happy to split out the
--skip-partitionschanges and the--verbosechanges into two PRs (or drop the verbose one if not desired).Summary
--verbose/-vflag to show progress with elapsed timestamps during database analysis--skip-partitionsflag to skip PostgreSQL table partitions (useful for databases with many partitions)--skip-partitionsis enabledMotivation
When running
tbls docagainst a PostgreSQL database through a proxy (e.g., Aurora), the command can appear to hang with no feedback. These changes help users:Example output
Test plan
--verboseshows progress with SQLite test database--skip-partitionsexcludes partition tablestbls outcommand also supports both flags