Re: controlling psql's use of the pager a bit more

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: controlling psql's use of the pager a bit more
Date: 2015-03-26 23:30:40
Message-ID: 551496A0.4070902@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 03/26/2015 11:10 AM, Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)com> writes:
>> Without having actually tried it, it looks clean enough to me. If
>> there's more pager options we might at some point introduce a pager
>> options struct instead adding more options to PageOutput. But for now it
>> seems ok enough.
> My reaction is that now would be the time to do that, really. This is
> messing up the argument lists of what seems like a whole lot of functions,
> and I have little faith that this is the last argument we'll need to add.
>
>

OK, this version only changes the signature of one function:
PageOutput(), which instead of taking just the pager flag takes a
pointer to the whole printTableOpt structure that contains both the
pager and pager_min_lines settings (NULL means don't use the pager).
That makes the patch smaller and less invasive, and a bit more future-proof.

cheers

andrew

Attachment Content-Type Size
psqlminlines2.patch text/x-patch 9.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2015-03-26 23:44:02 WIP: Split of hash index bucket
Previous Message David Fetter 2015-03-26 22:26:06 Bug fix for missing years in make_date()