xo / usql

Universal command-line interface for SQL databases
MIT License
8.88k stars 347 forks source link

Always exclude composite types when listing PostgreSQL tables #357

Closed nineinchnick closed 2 years ago

nineinchnick commented 2 years ago

Fixes #356

nineinchnick commented 2 years ago

I took a look at listTables: https://github.com/postgres/postgres/blob/master/src/bin/psql/describe.c#L3841 and it has inclusive filters, so there's always some filter. We allow listing tables without any filters so that it'll include other objects as well. I think the only case when that happens is in the completer, which gets "selectables", and a composite type is not a selectable.