Re: A question about generate_series - Mailing list pgsql-general

From Tom Lane
Subject Re: A question about generate_series
Date
Msg-id 94719.1685323825@sss.pgh.pa.us
Whole thread Raw
In response to A question about generate_series  ("文一" <896634148@qq.com>)
Responses Re: A question about generate_series  ("Wen Yi" <896634148@qq.com>)
List pgsql-general
"=?gb18030?B?zsTSuw==?=" <896634148@qq.com> writes:
> postgres=# SELECT x FROM generate_series(1, 25, 1) As x;
>  x  
> ----
>   1
>   2
>   3
>   4
>   5
>   6
>   7
>   8
>   9
>  10
>  11
>  12
>  13
>  14
>  15
>  16
>  17
>  18
>  19
>  20
>  21
> Time: 0.518 ms


> My question is, why postgres didn't print the 22 to 25?

I'm betting there's something broken about your pager
settings, because 21 is as far as the display would get
in a standard-height (24 lines) xterm window.  When I do
this I see

...
 19
 20
 21
--More--

Since you're not getting a prompt but just the subsequent
\timing output, it seems that the rest of the output went
into the bit bucket, which psql would certainly never do
on its own.  But a malfunctioning pager might act that way.

            regards, tom lane



pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: A question about generate_series
Next
From: "Wen Yi"
Date:
Subject: Re: A question about generate_series