Re: [GENERAL] Select works only when connected from login postgres

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Joseph Brenner <doomvox@gmail.com>
Cc: "David G. Johnston" <david.g.johnston@gmail.com>, Adrian Klaver <adrian.klaver@aklaver.com>, "pgsql-general@postgresql.org" <pgsql-general@postgresql.org>, pgsql-hackers@postgresql.org
Date: 2016-12-07T02:07:09Z
Lists: pgsql-hackers, pgsql-general

Attachments

Joseph Brenner <doomvox@gmail.com> writes:
> Well, my take would be that if you've taken the trouble to set an
> empty string as the PAGER that means something, and it probably means
> you don't want any pager to be used.

Yeah, on reflection that argument seems pretty persuasive.  So I propose
the attached patch.

BTW, I realized while testing this that there's still one gap in our
understanding of what went wrong for you: cases like "SELECT 'hello'"
should not have tried to use the pager, because that would've produced
less than a screenful of data.  But that's irrelevant here, because it
can easily be shown that psql doesn't behave nicely if PAGER is set to
empty when it does try to use the pager.

			regards, tom lane

Commits

  1. Handle empty or all-blank PAGER setting more sanely in psql.