Avoid columns being displayed with their maximum width in the data output tab in pgAdmin

Viewed 2196

In pgAdmin4 (version 5.5), when a SELECT * FROM tablename; query is executed, one can see on the bottom panel, under a tab called "Data Output", the resulting records for the selected columns for the specified table.

screenshot of the problem

If this table is having columns with very long string of data, e.g when encoded as JSON objects, or any PostGIS complex geometries, their width can be extraordinarily large, which affects the user experience negatively. Because going to some of the columns becomes a sub-pixel game when one try to grab and move the tiny horizontal slider (e.g. moving the slider half a pixel can move several columns by more than 2x the width of the screen...).

Did I miss something in the settings?
Is there a way to fix that, e.g. by setting a maximum width value for the columns? Because when using pgAdmin out-of-the-box, they are fully expanded...

I remember that is was not the case in earlier versions (4.x).

I'm using the latest dockerized version (5.5) as documented on the pgAdmin4 doc and available here: https://hub.docker.com/r/dpage/pgadmin4/

OS: Ubuntu 18.04
Web Browser: Firefox 89.0.2 (64-bit)

2 Answers

You can set the maximum width value for columns under File -> Preferences -> Query tool -> Results grid

Max column width setting pgAdmin 4

max column width setting pgAdmin 4

In the newest version of PG Admin v6 (6.7 as of 3/18/22) they changed this yet again. It is in the same place, but the option no longer lets you set the width. There is just a radio option to have super wide columns or base the width off of the column name

Preferences Screen PG admin 6.7

Related