Re: [HACKERS] proposal: psql concise mode

2011-11-14 Thread Ross Reedstrom
On Mon, Nov 07, 2011 at 11:01:39PM -0500, Josh Kupershmidt wrote: On Mon, Nov 7, 2011 at 10:04 PM, Robert Haas robertmh...@gmail.com wrote:  I can also see myself turning it on and then going - oh, wait, is that column not there, or did it just disappear because I'm in concise mode?

Re: [HACKERS] proposal: psql concise mode

2011-11-14 Thread Josh Kupershmidt
On Mon, Nov 14, 2011 at 5:16 PM, Ross Reedstrom reeds...@rice.edu wrote: Concise output might look like (bikeshed argument: splat indicates columns squashed out):  test=# \d+ foo                          Table public.foo  Column |  Type   # Storage #  +-+-+  a      

Re: [HACKERS] proposal: psql concise mode

2011-11-10 Thread Bruce Momjian
Robert Haas wrote: On Sun, Nov 6, 2011 at 3:29 PM, Josh Kupershmidt schmi...@gmail.com wrote: On Sun, Nov 6, 2011 at 1:16 PM, Dickson S. Guedes lis...@guedesoft.net wrote: test=# \d+ foo ? ? ? ? ? ? ? ? ? ? ? ? Table public.foo ?Column | ?Type ? | Storage +-+-

Re: [HACKERS] proposal: psql concise mode

2011-11-10 Thread Tom Lane
Josh Kupershmidt schmi...@gmail.com writes: FWIW, I just played around with 7.4 and 7.3 servers. (I had some bad memories of the older tarballs not building, but that must have been only on OS X -- I can build at least back to 7.3 on this Ubuntu 11.04 machine.) Most meta-commands worked

Re: [HACKERS] proposal: psql concise mode

2011-11-10 Thread Josh Kupershmidt
On Thu, Nov 10, 2011 at 3:41 PM, Bruce Momjian br...@momjian.us wrote: Have you tried \d+ with this psql mode:        \pset format wrapped It wraps the data so it fits on the screen --- it is my default in my .psqlrc. I think that's one of the many psql features I haven't experimented with,

Re: [HACKERS] proposal: psql concise mode

2011-11-10 Thread Josh Kupershmidt
On Thu, Nov 10, 2011 at 6:12 PM, Tom Lane t...@sss.pgh.pa.us wrote: As I suggested, many more unexpected failures (e.g. \dnS+) pop up when talking to a 7.3 server. It's not a big deal, but it'd be nice if we could instead error out with a sorry, we're too lazy to try to support 7.3 on the

Re: [HACKERS] proposal: psql concise mode

2011-11-10 Thread Dickson S. Guedes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10-11-2011 21:42, Josh Kupershmidt wrote: On Thu, Nov 10, 2011 at 3:41 PM, Bruce Momjian br...@momjian.us wrote: Have you tried \d+ with this psql mode: \pset format wrapped It wraps the data so it fits on the screen --- it is my

Re: [HACKERS] proposal: psql concise mode

2011-11-09 Thread Josh Kupershmidt
[Sorry for not CC'ing the list before, I'm still getting used to the new Gmail interface] On Tue, Nov 8, 2011 at 11:05 PM, Josh Kupershmidt schmi...@gmail.com wrote: On Tue, Nov 8, 2011 at 10:04 PM, Tom Lane t...@sss.pgh.pa.us wrote: Josh Kupershmidt schmi...@gmail.com writes: We're

Re: [HACKERS] proposal: psql concise mode

2011-11-08 Thread Alvaro Herrera
Excerpts from Robert Haas's message of mar nov 08 01:25:31 -0300 2011: But I can't help feeling that as we continue to add more features, we've eventually going to end up with our backs to the wall. Not sure what to do about that, but... What I've imagined for a long time is psql being able

Re: [HACKERS] proposal: psql concise mode

2011-11-08 Thread Dickson S. Guedes
2011/11/8 Alvaro Herrera alvhe...@commandprompt.com: What I've imagined for a long time is psql being able to display each row in more than one line; for example something like \df                       Listado de funciones  Esquema |      Nombre       | Tipo de dato de salida | Tipo  

Re: [HACKERS] proposal: psql concise mode

2011-11-08 Thread Alvaro Herrera
Excerpts from Dickson S. Guedes's message of mar nov 08 12:11:21 -0300 2011: Isn't that what pagers like 'less' and 'more' do already? May be we could provide a pager more specific to psql output as a contrib or extension. Well, now that you mention it, all pagers I know are line-based. If

Re: [HACKERS] proposal: psql concise mode

2011-11-08 Thread Dickson S. Guedes
2011/11/8 Alvaro Herrera alvhe...@commandprompt.com: Excerpts from Dickson S. Guedes's message of mar nov 08 12:11:21 -0300 2011: Isn't that what pagers like 'less' and 'more' do already? May be we could provide a pager more specific to psql output as a contrib or extension. Well, now that

Re: [HACKERS] proposal: psql concise mode

2011-11-08 Thread Josh Kupershmidt
On Mon, Nov 7, 2011 at 11:25 PM, Robert Haas robertmh...@gmail.com wrote: But I can't help feeling that as we continue to add more features, we've eventually going to end up with our backs to the wall.  Not sure what to do about that, but... Seriously, parts of psql are starting to become a

Re: [HACKERS] proposal: psql concise mode

2011-11-08 Thread Tom Lane
Josh Kupershmidt schmi...@gmail.com writes: We're essentially pretending that we support all server versions with this code, instead of erroring out on some definite old version and admitting sorry, can't do it. ... I think we should draw a line somewhere about just how far back psql must

Re: [HACKERS] proposal: psql concise mode

2011-11-07 Thread Robert Haas
On Sun, Nov 6, 2011 at 3:29 PM, Josh Kupershmidt schmi...@gmail.com wrote: On Sun, Nov 6, 2011 at 1:16 PM, Dickson S. Guedes lis...@guedesoft.net wrote: test=# \d+ foo                         Table public.foo  Column |  Type   | Storage +-+-  a      | integer |

Re: [HACKERS] proposal: psql concise mode

2011-11-07 Thread Josh Kupershmidt
On Mon, Nov 7, 2011 at 10:04 PM, Robert Haas robertmh...@gmail.com wrote: I don't strongly object to this, but I wonder how useful it will really be in practice.  It strikes me as the sort of advanced psql hackery that only a few people will use, and only some of those will gain any benefit.

Re: [HACKERS] proposal: psql concise mode

2011-11-07 Thread Robert Haas
On Mon, Nov 7, 2011 at 11:01 PM, Josh Kupershmidt schmi...@gmail.com wrote: What really prompted the proposal was my somewhat antiquated use of 80-column terminal windows (so that 2 or 3 fit side-by-side comfortably on my screen). A lot of the backslash commands are creeping well over that

Re: [HACKERS] proposal: psql concise mode

2011-11-06 Thread Dickson S. Guedes
2011/11/5 Josh Kupershmidt schmi...@gmail.com: I'd like to propose a concise mode for psql, which users might turn on via a \pset option. Concise mode would affect only the output of psql's backslash commands. For output results which have some all-NULL columns, as in: test=# \d+ foo        

Re: [HACKERS] proposal: psql concise mode

2011-11-06 Thread Josh Kupershmidt
On Sun, Nov 6, 2011 at 1:16 PM, Dickson S. Guedes lis...@guedesoft.net wrote: test=# \d+ foo                         Table public.foo  Column |  Type   | Storage +-+-  a      | integer | plain  b      | integer | plain Has OIDs: no Using your example, what if

[HACKERS] proposal: psql concise mode

2011-11-05 Thread Josh Kupershmidt
Hi all, The good news is that psql's backslash commands are becoming quite thorough at displaying all information which could conceivably be of interest about an object. The bad news is, psql's backslash commands often produce a lot of noise and wasted output. (There was some grumbling along