Re: proposal: psql PSQL_TABULAR_PAGER variable
От | Pavel Stehule |
---|---|
Тема | Re: proposal: psql PSQL_TABULAR_PAGER variable |
Дата | |
Msg-id | CAFj8pRBFdAsbN3BneyzO_YEm=ZeWDXWfPKgv0cEyWpFejpGR2w@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: proposal: psql PSQL_TABULAR_PAGER variable (Bruce Momjian <bruce@momjian.us>) |
Ответы |
Re: proposal: psql PSQL_TABULAR_PAGER variable
Re: proposal: psql PSQL_TABULAR_PAGER variable |
Список | pgsql-hackers |
čt 18. 4. 2019 v 15:51 odesílatel Bruce Momjian <bruce@momjian.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@momjian.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 +
В списке pgsql-hackers по дате отправления: