Re: proposal: psql PSQL_TABULAR_PAGER variable - Mailing list pgsql-hackers

From Robert Haas
Subject Re: proposal: psql PSQL_TABULAR_PAGER variable
Date
Msg-id CA+TgmoZEPBFJu0REDmX-6xa-AXh977D1WfXPDCZ8w82SMeccQA@mail.gmail.com
Whole thread Raw
In response to Re: proposal: psql PSQL_TABULAR_PAGER variable  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: proposal: psql PSQL_TABULAR_PAGER variable
Re: proposal: psql PSQL_TABULAR_PAGER variable
List pgsql-hackers
On Thu, Apr 18, 2019 at 11:46 AM Pavel Stehule <pavel.stehule@gmail.com> wrote:
> 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
>   }
>

Seems like pspg could just hand off to the regular pager if it
discovers that the input is not in a format it finds suitable.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: [PATCH v1] Add \echo_stderr to psql
Next
From: Tom Lane
Date:
Subject: Re: proposal: psql PSQL_TABULAR_PAGER variable