Re: A tiny improvement of psql

2023-12-26 Thread Kirk Wolak
On Tue, Dec 26, 2023 at 11:26 AM Kevin Wang wrote: > Hello hackers! > > I am an Oracle/PostgreSQL DBA, I am not a PG hacker. During my daily job, > I find a pain that should be fixed. > > As you know, we can use the UP arrow key to get the previous command to > avoid extra typing. This is a wond

Re: A tiny improvement of psql

2023-12-26 Thread Deepak M
On repeating the execution of last command in psql, we can always use below command to send current query buffer to server. \g \gx (with expanded output mode, that always come handy.) On Tue, Dec 26, 2023 at 9:56 PM Kevin Wang wrote: > Hello hackers! > > I am an Oracle/PostgreSQL DBA, I am not

Re: A tiny improvement of psql

2023-12-26 Thread Jelte Fennema-Nio
On Tue, 26 Dec 2023 at 22:45, Vik Fearing wrote: > It is kind of something we control. Per the psql docs, setting > > HISTCONTROL=ignoredups > > will do the trick. Yeah, the easiest "fix" (that I know of) for a user is to set HISTCONTROL in ~/.psqlrc to ignoredups using: \set HISTCONTROL i

Re: A tiny improvement of psql

2023-12-26 Thread Vik Fearing
On 12/26/23 17:36, Tom Lane wrote: Kevin Wang writes: As you know, we can use the UP arrow key to get the previous command to avoid extra typing. This is a wonderful feature to save the lives of every DBA. However, if I type the commands like this sequence: A, B, B, B, B, B, B, as you can see,

Re: A tiny improvement of psql

2023-12-26 Thread Tom Lane
Kevin Wang writes: > As you know, we can use the UP arrow key to get the previous command to > avoid extra typing. This is a wonderful feature to save the lives of every > DBA. However, if I type the commands like this sequence: A, B, B, B, B, B, > B, as you can see, B is the last command I execu

A tiny improvement of psql

2023-12-26 Thread Kevin Wang
Hello hackers! I am an Oracle/PostgreSQL DBA, I am not a PG hacker. During my daily job, I find a pain that should be fixed. As you know, we can use the UP arrow key to get the previous command to avoid extra typing. This is a wonderful feature to save the lives of every DBA. However, if I type