Re: wrapping in extended mode doesn't work well with default pager

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Greg Stark <stark(at)mit(dot)edu>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Noah Misch <noah(at)leadboat(dot)com>, Sergey Muraviov <sergey(dot)k(dot)muraviov(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Emre Hasegeli <emre(at)hasegeli(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: wrapping in extended mode doesn't work well with default pager
Date: 2014-06-17 10:49:28
Message-ID: CAFj8pRB5M=ohVPWGfj2DFerVtrRbdHp7jc0E-t+2skq51Ephag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2014-06-16 23:28 GMT+02:00 Jeff Janes <jeff(dot)janes(at)gmail(dot)com>:

> On Wed, Jun 11, 2014 at 12:59 PM, Greg Stark <stark(at)mit(dot)edu> wrote:
>
> > I think this whole exercise has mostly just convinced me we should
> > implement an HTTP interface and reimplement psql as a browser app.
>
> I certainly hope not. I've seen lots of browser apps that were nice
> enough to use for casual use by a casual user. I've never seen one
> that was an effective power tool for power users, the way psql is.
> Now maybe they are out there and I just don't know about them, but I
> have my doubts.
>
> As an additional tool, to each his own. But a browser-based
> replacement for psql, -1 from me.
>

We can integrate a text console browsers like links, elinks or lynx instead

and we can call a BROWSER instead PAGER when \pset is html

pavel(at)localhost postgresql92]$ PAGER="elinks -force-html" psql postgres
psql (9.4beta1)
Type "help" for help.

postgres=# \pset format html
Output format (format) is html.
postgres=# SELECT * FROM pg_proc;

works perfect

[pavel(at)localhost postgresql92]$ PAGER="lynx -stdin" psql postgres
psql (9.4beta1)
Type "help" for help.

postgres=# \pset format html
Output format (format) is html.
postgres=# SELECT * FROM pg_proc;

Writing html browsing into psql is useless now and I don't think so it is
good idea. On second hand better integration mentioned browsers can be very
useful.

Regards

Pavel

>
> And as far browser-based things apply to this patch, I must say I've
> tried micromanaging the way large amounts of data wrap in a HTML table
> when I found the default to be inadequate, and I have not found that
> to be noticeably easy, either.
>
> The original version of this patch was only a few lines long and did
> one very simple and useful thing: avoiding the printing of whole
> screens full of hyphens when in 'expanded mode'. If we end up
> reverting the other parts of this patch, hopefully we don't lose that
> part.
>
> Cheers,
>
> Jeff
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ian Barwick 2014-06-17 11:36:16 [REVIEW] psql tab completion for DROP TRIGGER/RULE and ALTER TABLE ... DISABLE/ENABLE
Previous Message Andres Freund 2014-06-17 10:26:58 Re: Wait free LW_SHARED acquisition - v0.2