Skip site navigation (1) Skip section navigation (2)

Re: Tech details - psql wraps at window width

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Bryce Nesbitt <bryce2(at)obviously(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Tech details - psql wraps at window width
Date: 2008-04-26 03:34:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Bryce Nesbitt wrote:
> But I agree it's not desirable to wrap file any sort of stream output, 
> by default, as that would break just about any script known to mankind.  
> Yet wrapping is a very user-friendly default for interactive terminals. 
> This is potentially an irreconcilable inconsistency.
> I weigh in on the side of leaving it inconsistent, but making it really 
> easy to force the behavior you want with something like:
>    \pset format wrap [auto|nnn|off]
> But that leaves a big hole: what does the setting in .psqlrc refer to?  
> Do we need separate controls in .psql?
>    \pset format_terminal wrap [auto|nnn|off]
>    \pset format_terminal html
>    \pset format_stream wrap [auto|nnn|off]
>    \pset format_stream html
> Where, on a stream, auto and off would have the same meaning, and \pset 
> format would set both?

Hey, I can work with this idea.  First, there really is no 'off' mode
for wrapped because that is aligned.  What we could do is to have:

	\pset format wrapped display

affect only output to the screen, using the screen width, and:

	\pset format wrapped nnn

affect output to the screen and file/pipes.

  Bruce Momjian  <bruce(at)momjian(dot)us>

  + If your life is a hard drive, Christ can be your backup. +

In response to


pgsql-hackers by date

Next:From: Euler Taveira de OliveiraDate: 2008-04-26 03:41:20
Subject: ecpg localization
Previous:From: Bryce NesbittDate: 2008-04-26 02:16:31
Subject: Tech details - psql wraps at window width

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group