pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
A question about generate_series
4+ messages / 4 participants
[nested] [flat]

* A question about generate_series
@ 2023-05-29 01:24  文一 <896634148@qq.com>
  0 siblings, 2 replies; 4+ messages in thread

From: 文一 @ 2023-05-29 01:24 UTC (permalink / raw)
  To: pgsql-general <pgsql-general@lists.postgresql.org>

Hi team,
when I use the generate_series,as you can see
(Fedora Linux 37, PGSQL 15.3)



postgres=# SELECT x FROM generate_series(1, 25, 1) As x;
&nbsp;x &nbsp;
----
&nbsp; 1
&nbsp; 2
&nbsp; 3
&nbsp; 4
&nbsp; 5
&nbsp; 6
&nbsp; 7
&nbsp; 8
&nbsp; 9
&nbsp;10
&nbsp;11
&nbsp;12
&nbsp;13
&nbsp;14
&nbsp;15
&nbsp;16
&nbsp;17
&nbsp;18
&nbsp;19
&nbsp;20
&nbsp;21
Time: 0.518 ms



My question is, why postgres didn't print the 22 to 25?
Can someone give some advice?
Thanks in advance!



Yours,
Wen Yi

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: A question about generate_series
@ 2023-05-29 01:29  David G. Johnston <david.g.johnston@gmail.com>
  parent: 文一 <896634148@qq.com>
  1 sibling, 0 replies; 4+ messages in thread

From: David G. Johnston @ 2023-05-29 01:29 UTC (permalink / raw)
  To: 文一 <896634148@qq.com>; +Cc: pgsql-general <pgsql-general@lists.postgresql.org>

On Sunday, May 28, 2023, 文一 <896634148@qq.com> wrote:

> Hi team,
> when I use the generate_series,as you can see
> (Fedora Linux 37, PGSQL 15.3)
>
> 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?
> Can someone give some advice?
> Thanks in advance!
>

Some kind of visual interaction between psql, the pager, and your terminal?

David J.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: A question about generate_series
@ 2023-05-29 01:30  Tom Lane <tgl@sss.pgh.pa.us>
  parent: 文一 <896634148@qq.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Tom Lane @ 2023-05-29 01:30 UTC (permalink / raw)
  To: 文一 <896634148@qq.com>; +Cc: pgsql-general@lists.postgresql.org

"=?gb18030?B?zsTSuw==?=" <896634148@qq.com> writes:
> postgres=# SELECT x FROM generate_series(1, 25, 1) As x;
> &nbsp;x &nbsp;
> ----
> &nbsp; 1
> &nbsp; 2
> &nbsp; 3
> &nbsp; 4
> &nbsp; 5
> &nbsp; 6
> &nbsp; 7
> &nbsp; 8
> &nbsp; 9
> &nbsp;10
> &nbsp;11
> &nbsp;12
> &nbsp;13
> &nbsp;14
> &nbsp;15
> &nbsp;16
> &nbsp;17
> &nbsp;18
> &nbsp;19
> &nbsp;20
> &nbsp;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





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: A question about generate_series
@ 2023-05-29 01:32  Wen Yi <896634148@qq.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Wen Yi @ 2023-05-29 01:32 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general <pgsql-general@lists.postgresql.org>

Oh, I change my terminal settings (gnome-terminal), it works, thanks very much!
Yours,
Wen Yi

&nbsp;


BeginnerC
896634148@qq.com



&nbsp;

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2023-05-29 01:32 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-05-29 01:24 A question about generate_series 文一 <896634148@qq.com>
2023-05-29 01:29 ` David G. Johnston <david.g.johnston@gmail.com>
2023-05-29 01:30 ` Tom Lane <tgl@sss.pgh.pa.us>
2023-05-29 01:32   ` Wen Yi <896634148@qq.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox