cli icon indicating copy to clipboard operation
cli copied to clipboard

Option to enable expanded display mode for 'inspect db' commands

Open microamp opened this issue 9 months ago • 2 comments

Is your feature request related to a problem? Please describe.

At the moment, what supabase inspect db spits out is quite hard to read. Turning on the expanded display mode will make it more readable. In psql, you can enable it as below.

\x on

Describe the solution you'd like

Options to enable and disable the expanded display mode.

  • --expanded-display-mode (to enable)
  • --no-expanded-display-mode (to disable)

I personally think the expanded display mode should be the default mode for all supabase inspect db commands.

Describe alternatives you've considered

With --debug on, extract the raw query from the output of each supabase inspect db command, and run it in psql instead.

Additional context

None

microamp avatar May 22 '25 13:05 microamp

References:

  • psql (offical documentation): https://www.postgresql.org/docs/current/app-psql.html
  • Crunchy Data also recommends the expanded mode: https://www.crunchydata.com/developers/playground/query-performance-analytics

microamp avatar May 22 '25 13:05 microamp

I personally think the expanded display mode should be the default mode for all supabase inspect db commands.

that read data from pg_stat_statements to be precise (because there are others that don't where the expanded diplay mode would not make much difference)

microamp avatar May 22 '25 13:05 microamp