Can we modify pg_dumpall (or pg_dump?) to include a \pset pager off
to prevent the setval() calls from halting an interactive \i of the dump 
file?

Thanks,
LER


-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


Mon, 11 Aug 2003 12:39:07 -0500
Larry Rosenman <ler@lerctr.org>
Change Request: \pset pager off in pg_dumpall
Larry Rosenman wrote:
> Can we modify pg_dumpall (or pg_dump?) to include a \pset pager off
> to prevent the setval() calls from halting an interactive \i of the dump 
> file?

Your pg_dump's actually invoke the pager?  Are you manually starting
psql, then doing \i dumpfile?  Why would you do that rather than psql
template1 <dumpfile?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Mon, 11 Aug 2003 18:23:47 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: Change Request: \pset pager off in pg_dumpall
On Mon, 11 Aug 2003, Bruce Momjian wrote:

> Larry Rosenman wrote:
> > Can we modify pg_dumpall (or pg_dump?) to include a \pset pager off
> > to prevent the setval() calls from halting an interactive \i of the dump
> > file?
>
> Your pg_dump's actually invoke the pager?  Are you manually starting
> psql, then doing \i dumpfile?  Why would you do that rather than psql
> template1 <dumpfile?
Because I'm a dork :-).

Seriously, sometimes it's useful.

LER

>
>

-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

Mon, 11 Aug 2003 18:46:29 -0500 (CDT)
Larry Rosenman <ler@lerctr.org>
Re: Change Request: \pset pager off in pg_dumpall
Larry Rosenman <ler@lerctr.org> writes:
> On Mon, 11 Aug 2003, Bruce Momjian wrote:
>> Larry Rosenman wrote:
>>> Can we modify pg_dumpall (or pg_dump?) to include a \pset pager off
>>> to prevent the setval() calls from halting an interactive \i of the dump
>>> file?
>> 
>> Your pg_dump's actually invoke the pager?

> Seriously, sometimes it's useful.

Are you using any nonstandard settings in ~/.psqlrc?  I've never seen
this happen myself.

			regards, tom lane

Mon, 11 Aug 2003 20:36:11 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Change Request: \pset pager off in pg_dumpall 
> > Your pg_dump's actually invoke the pager?  Are you manually starting
> > psql, then doing \i dumpfile?  Why would you do that rather than psql
> > template1 <dumpfile?
> Because I'm a dork :-).
>
> Seriously, sometimes it's useful.

The most useful reason (and I wish you could turn it on with psql < file) is
the line number in the file where any errors occur.

(TODO item?)

Chris


Tue, 12 Aug 2003 09:26:42 +0800
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
Re: Change Request: \pset pager off in pg_dumpall


--On Monday, August 11, 2003 20:36:11 -0400 Tom Lane <tgl@sss.pgh.pa.us> 
wrote:

> Larry Rosenman <ler@lerctr.org> writes:
>> On Mon, 11 Aug 2003, Bruce Momjian wrote:
>>> Larry Rosenman wrote:
>>>> Can we modify pg_dumpall (or pg_dump?) to include a \pset pager off
>>>> to prevent the setval() calls from halting an interactive \i of the
>>>> dump file?
>>>
>>> Your pg_dump's actually invoke the pager?
>
>> Seriously, sometimes it's useful.
>
> Are you using any nonstandard settings in ~/.psqlrc?  I've never seen
> this happen myself.
Nope.  There is no .psqlrc.

It seems to be new with 7.4cvs. (dunno about earlier 7.4), but it definitely
did NOT happen with 7.3.x

LER

>
> 			regards, tom lane



-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


Mon, 11 Aug 2003 20:32:18 -0500
Larry Rosenman <ler@lerctr.org>
Re: Change Request: \pset pager off in pg_dumpall 
Christopher Kings-Lynne writes:

> The most useful reason (and I wish you could turn it on with psql < file) is
> the line number in the file where any errors occur.

psql -f file will do that.

-- 
Peter Eisentraut   peter_e@gmx.net

Tue, 12 Aug 2003 09:30:20 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: Change Request: \pset pager off in pg_dumpall
Larry Rosenman <ler@lerctr.org> writes:
> Nope.  There is no .psqlrc.

> It seems to be new with 7.4cvs. (dunno about earlier 7.4), but it definitely
> did NOT happen with 7.3.x

Hmph.  There have been some changes in 7.4 psql's pager support, but I
can't see anything there that looks like it would cause this.  And it
(still) doesn't happen on my machine.  Would you trace through
PageOutput and see why it's deciding to use the pager for short output?

			regards, tom lane

Tue, 12 Aug 2003 09:30:39 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Change Request: \pset pager off in pg_dumpall 


--On Tuesday, August 12, 2003 09:30:39 -0400 Tom Lane <tgl@sss.pgh.pa.us> 
wrote:

> Larry Rosenman <ler@lerctr.org> writes:
>> Nope.  There is no .psqlrc.
>
>> It seems to be new with 7.4cvs. (dunno about earlier 7.4), but it
>> definitely did NOT happen with 7.3.x
>
> Hmph.  There have been some changes in 7.4 psql's pager support, but I
> can't see anything there that looks like it would cause this.  And it
> (still) doesn't happen on my machine.  Would you trace through
> PageOutput and see why it's deciding to use the pager for short output?
seems to do it for ANY SRF, if that helps any.

I.E. \d, and show all;.

LER

>
> 			regards, tom lane



-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


Tue, 12 Aug 2003 09:28:28 -0500
Larry Rosenman <ler@lerctr.org>
Re: Change Request: \pset pager off in pg_dumpall 
Tom Lane <tgl@sss.pgh.pa.us> writes:
> Larry Rosenman <ler@lerctr.org> writes:
>> It seems to be new with 7.4cvs. (dunno about earlier 7.4), but it definitely
>> did NOT happen with 7.3.x

> Hmph.  There have been some changes in 7.4 psql's pager support, but I
> can't see anything there that looks like it would cause this.

Turns out someone moved PageOutput() from one file to another, and
didn't move all the supporting #includes.  On your machine, TIOCGWINSZ
was coming up undefined, thus disabling the check for does-output-fit-
on-a-page.

			regards, tom lane

Thu, 14 Aug 2003 15:12:05 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Change Request: \pset pager off in pg_dumpall 