From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: psql PSQL_TABULAR_PAGER variable |
Date: | 2019-04-18 15:45:24 |
Message-ID: | CAFj8pRBFdAsbN3BneyzO_YEm=ZeWDXWfPKgv0cEyWpFejpGR2w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
čt 18. 4. 2019 v 15:51 odesílatel Bruce Momjian <bruce(at)momjian(dot)us> napsal:
> On Thu, Apr 18, 2019 at 07:20:37AM +0200, Pavel Stehule wrote:
> > Hi
> >
> > I wrote a pspg pager https://github.com/okbob/pspg
> >
> > This pager is designed for tabular data. It can work in fallback mode as
> > classic pager, but it is not designed for this purpose (and I don't plan
> do
> > it). Can we enhance a set of psql environment variables about
> > PSQL_TABULAR_PAGER variable. This pager will be used, when psql will
> display
> > tabular data.
>
> In testing pspg, it seems to work fine with tabular and \x-non-tabular
> data. Are you asking for a pager option that is only used for non-\x
> display? What do people want the non-pspg pager to do?
>
My idea is following - pseudocode
if view is a table
{
if is_defined PSQL_TABULAR_PAGER
{
pager = PSQL_TABULAR_PAGER
}
else if is_defined PSQL_PAGER
{
pager = PSQL_PAGER
}
else
{
pager = PAGER
}
}
else /* for \h xxx */
{
if is_defined PSQL_PAGER
{
pager = PSQL_PAGER
}
else
{
pager = PAGER
}
}
I expect some configuration like
PSQL_TABULAR_PAGER=pspg
PSQL_PAGER="less -S"
Regards
Pavel
> --
> Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
> EnterpriseDB http://enterprisedb.com
>
> + As you are, so once was I. As I am, so you will be. +
> + Ancient Roman grave inscription +
>
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2019-04-18 15:58:13 | Re: proposal: psql PSQL_TABULAR_PAGER variable |
Previous Message | Bruce Momjian | 2019-04-18 15:34:32 | Re: block-level incremental backup |