Re: proposal: psql PSQL_TABULAR_PAGER variable

2019-04-22 Thread Pavel Stehule
po 22. 4. 2019 v 16:21 odesílatel Tom Lane napsal: > Robert Haas writes: > > 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. > > It might be slightly tricky to do that after having already consumed > some of the

Re: proposal: psql PSQL_TABULAR_PAGER variable

2019-04-22 Thread Pavel Stehule
po 22. 4. 2019 v 15:46 odesílatel Robert Haas napsal: > On Thu, Apr 18, 2019 at 11:46 AM Pavel Stehule > wrote: > > My idea is following - pseudocode > > > > if view is a table > > { > > if is_defined PSQL_TABULAR_PAGER > > { > > pager = PSQL_TABULAR_PAGER > > } > > else if

Re: proposal: psql PSQL_TABULAR_PAGER variable

2019-04-22 Thread Tom Lane
Robert Haas writes: > 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. It might be slightly tricky to do that after having already consumed some of the input :-(. Still, I've got to say that I find this proposal

Re: proposal: psql PSQL_TABULAR_PAGER variable

2019-04-22 Thread Robert Haas
On Thu, Apr 18, 2019 at 11:46 AM Pavel Stehule 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

Re: proposal: psql PSQL_TABULAR_PAGER variable

2019-04-18 Thread Pavel Stehule
čt 18. 4. 2019 v 21:12 odesílatel Alvaro Herrera napsal: > On 2019-Apr-18, Pavel Stehule wrote: > > > I don't know any about other cases. Other results in psql has tabular > > format. > > What about EXPLAIN? > I forgot it, thank you Pavel > -- > Álvaro Herrera

Re: proposal: psql PSQL_TABULAR_PAGER variable

2019-04-18 Thread Alvaro Herrera
On 2019-Apr-18, Pavel Stehule wrote: > I don't know any about other cases. Other results in psql has tabular > format. What about EXPLAIN? -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: proposal: psql PSQL_TABULAR_PAGER variable

2019-04-18 Thread Pavel Stehule
čt 18. 4. 2019 v 18:35 odesílatel Bruce Momjian napsal: > On Thu, Apr 18, 2019 at 06:06:40PM +0200, Pavel Stehule wrote: > > > > > > čt 18. 4. 2019 v 17:58 odesílatel Bruce Momjian > napsal: > > > > On Thu, Apr 18, 2019 at 05:45:24PM +0200, Pavel Stehule wrote: > > > čt 18. 4. 2019 v

Re: proposal: psql PSQL_TABULAR_PAGER variable

2019-04-18 Thread Bruce Momjian
On Thu, Apr 18, 2019 at 06:06:40PM +0200, Pavel Stehule wrote: > > > čt 18. 4. 2019 v 17:58 odesílatel Bruce Momjian napsal: > > On Thu, Apr 18, 2019 at 05:45:24PM +0200, Pavel Stehule wrote: > > čt 18. 4. 2019 v 15:51 odesílatel Bruce Momjian > napsal: > >     In testing

Re: proposal: psql PSQL_TABULAR_PAGER variable

2019-04-18 Thread Pavel Stehule
čt 18. 4. 2019 v 17:58 odesílatel Bruce Momjian napsal: > On Thu, Apr 18, 2019 at 05:45:24PM +0200, Pavel Stehule wrote: > > čt 18. 4. 2019 v 15:51 odesílatel Bruce Momjian > napsal: > > In testing pspg, it seems to work fine with tabular and > \x-non-tabular > > data. Are you asking

Re: proposal: psql PSQL_TABULAR_PAGER variable

2019-04-18 Thread Bruce Momjian
On Thu, Apr 18, 2019 at 05:45:24PM +0200, Pavel Stehule wrote: > čt 18. 4. 2019 v 15:51 odesílatel Bruce Momjian napsal: > 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

Re: proposal: psql PSQL_TABULAR_PAGER variable

2019-04-18 Thread Pavel Stehule
čt 18. 4. 2019 v 15:51 odesílatel Bruce Momjian 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

Re: proposal: psql PSQL_TABULAR_PAGER variable

2019-04-18 Thread Bruce Momjian
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

proposal: psql PSQL_TABULAR_PAGER variable

2019-04-17 Thread Pavel Stehule
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.