dbcli/litecli

<null> entries in .schema output

Closed this issue · 0 comments

SQLite creates internal indexes for primary keys and unique constraints, and the value for the sql column in the sqlite_schema system table is NULL for these. Thus, running .schema on any sqlite database with at least one table with a primary key or unique constraint results in <null> entries when you run .schema.

These should be filtered out; a WHERE sql IS NOT NULL filter should do. I don't see any need to filter out other internal objects (starting with sqlite_) here, they have their uses, but the output for internal indexes have no context and only confuse.