Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am using Postgresql's shell client, psql. If I type a query that extends past the console width, the shell does horizontal "scrolling", i.e. I have to move the cursor around to see the full contents of the query. The screenshot below shows an example.

Is it possible to change this to wrap the query instead? There are many use cases where I like to copy the query. If not, are there any alternative console-based clients that are potential alternatives?

enter image description here

share|improve this question
2  
That behaviour is part of your terminal client / readline library. psql doesn't have much control over it. –  Craig Ringer Jun 25 at 5:59
    
One thing you can control is wrapping of query output via \pset format wrapped, but agreed that that wouldn't affect scrolling on things like typing out a query. –  Ken Hampson Jun 25 at 6:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.