Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UswiX-00081g-Aw for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Jun 2013 15:05:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1UswiW-0004DC-Fh for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Jun 2013 15:05:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UswiT-0004D3-J6 for pgsql-hackers@postgresql.org; Sat, 29 Jun 2013 15:05:33 +0000 Received: from mimolette.dalibo.net ([212.85.154.222]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UswiL-0002ax-BU for pgsql-hackers@postgresql.org; Sat, 29 Jun 2013 15:05:33 +0000 Received: from [192.168.1.107] (AGrenoble-551-1-198-128.w92-129.abo.wanadoo.fr [92.129.157.128]) by mimolette.dalibo.net (Postfix) with ESMTPA id D46A44500895; Sat, 29 Jun 2013 17:05:23 +0200 (CEST) Message-ID: <51CEF7B2.8070300@dalibo.com> Date: Sat, 29 Jun 2013 17:05:22 +0200 From: Gilles Darold User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: Erik Rijkers CC: pgsql-hackers@postgresql.org Subject: Re: psql and pset without any arguments References: <51CE1760.3020208@dalibo.com> In-Reply-To: X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org 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 . >> (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 . > > > 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