A question about generate_series
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! Yours, Wen Yi
Re: A question about generate_series
On Sunday, May 28, 2023, 文一 <896634...@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.
Re: A question about generate_series
"=?gb18030?B?zsTSuw==?=" <896634...@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
Re: A question about generate_series
Oh, I change my terminal settings (gnome-terminal), it works, thanks very much! Yours, Wen Yi BeginnerC 896634...@qq.com
How to make the generate_series to generate the letter series?
Hi team, when I study the generate_series function, I found that it can not only generate the number series but also can generate the date series.(ref: https://www.postgresql.org/docs/current/functions-srf.html) That means I can make the generate_series to generate the letter series. So I try this command (I guess I can follow the ascil code rule to complete this work): # SELECT * FROM generate_series('a'::int, 'z'::int, 1); But the postgres reply me a error, because the 'a' can't translate into 'integer' type. Can someone provide me a better solution? Thanks in advance! Yours, Wen Yi
Re: How to make the generate_series to generate the letter series?
2023年5月29日(月) 12:39 Wen Yi <896634...@qq.com>: > > Hi team, > when I study the generate_series function, I found that it can not only > generate the number series but also can generate the date series.(ref: > https://www.postgresql.org/docs/current/functions-srf.html) > That means I can make the generate_series to generate the letter series. > > So I try this command (I guess I can follow the ascil code rule to complete > this work): > > # SELECT * FROM generate_series('a'::int, 'z'::int, 1); > > But the postgres reply me a error, because the 'a' can't translate into > 'integer' type. > > Can someone provide me a better solution? > Thanks in advance! SELECT chr(x + 96) FROM generate_series(1, 26) x Regards Ian Barwick
SSPI authentication failed for user "xxx"
Hello, Following the upgrade from version 12.5 to 12.14, you have encountered an issue where the windows application fails to connect, and the log messages indicate the following: FATAL: SSPI authentication failed for user "xxx". DETAIL: Connection matched pg_hba.conf. The application establishes a successful connection when the connection string contains: "Host=localhost;Port=18083;Database=DBName;Username=xxx;Timeout=60;Command Timeout=60;Integrated Security=True;" However, it fails when the string contains "SSL Mode=Require;Trust Server Certificate=True;", and reverting back to version 12.5 resolves the issue. It is worth noting that pgAdmin uses the same usermap and connection is successful. You have also attempted to add the Active Directory user to the usermap, but the connection remains unsuccessful. We appreciate your detailed explanation of the situation and will provide assistance accordingly. Thanks Albert Praveen