From: Gilles Darold <gilles.darold@dalibo.com>
To: Erik Rijkers <er@xs4all.nl>
Cc: pgsql-hackers@postgresql.org
Subject: Re: psql and pset without any arguments
Date: Sat, 29 Jun 2013 17:05:22 +0200
Message-ID: <51CEF7B2.8070300@dalibo.com> (raw)
In-Reply-To: <c5f1270dffdf93c5c78750e87e332b35.squirrel@webmail.xs4all.nl>
References: <51CE1760.3020208@dalibo.com>
<c5f1270dffdf93c5c78750e87e332b35.squirrel@webmail.xs4all.nl>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Le 29/06/2013 13:55, Erik Rijkers a écrit :
> On Sat, June 29, 2013 01:08, Gilles Darold wrote:
>> Here is a sample output:
>>
>> (postgres@[local]:5494) [postgres] > \pset
>> Output format is aligned.
>> Border style is 2.
>> Expanded display is used automatically.
>> Null display is "NULL".
>> Field separator is "|".
>> Tuples only is off.
>> Title is unset.
>> Table attributes unset.
>> Line style is unicode.
>> Pager is used for long output.
>> Record separator is <newline>.
>> (postgres@[local]:5494) [postgres] >
>>
> +1
>
> This seems handy. Maybe it could be improved
> a bit with the keyboard shortcuts prefixed, like so:
>
> (postgres@[local]:5494) [postgres] > \pset
> \a Output format is aligned.
> \x Expanded display is used automatically.
> \f Field separator is "|".
> \t Tuples only is off.
> \C Title is unset.
> \T Table attributes unset.
> Border style is 2.
> Line style is unicode.
> Null display is "NULL".
> Pager is used for long output.
> Record separator is <newline>.
>
>
> So that it also serves a reminder on how to subsequently
> change them
My first though was to print something like \set output, but why not
reuse the original code/output when \pset is used ?
This second choice has three main advantages :
* Information shown is the same everywhere
* Backward compatibility with \pset output
* Avoid code redundancy
About shortcut I'm agree with Pavel that it is less readable and already
in the help, \? is the big reminder :-)
Regards,
--
Gilles Darold
http://dalibo.com - http://dalibo.org
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: gilles.darold@dalibo.com, er@xs4all.nl
Subject: Re: psql and pset without any arguments
In-Reply-To: <51CEF7B2.8070300@dalibo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox