Truncating display by default in postgres psql select statements
问题 I have a table with a long text column. I'd like to be able to select all of the columns but limit the text column without needing to write every column. select * from resources; Produces an output that is too long to display correctly in psql. I can get something to show up by using substr() or left() on the long column, but then I need to specify each column. select id, left(data, 50), file_format_version, ... from resources; Is there a way that I can just get psql to truncate long columns