From: | Robin Knipe <robin(dot)knipe(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #16956: psql won't load command history |
Date: | 2021-04-08 17:14:12 |
Message-ID: | CAAZv_5tW0QW4KYiFT=awXTQkUBM92rsnsysGg5P1TTFUiVq1Ew@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hi Tom
Thanks for your reply. I think those _HiStOrY_V2_ entries are just the
start of the saved session, so the multiples there signify empty sessions,
where I've started a session, checked for history (by pressing up arrow)
and then exited again without entering any commands. I'll see if I can
report the bug to `libedit`...
Thanks,
Robin.
On Thu, 8 Apr 2021 at 17:04, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> > Running the `psql` command from docker (postgres:12-alpine), fails to
> load
> > the `.psql_history` command contents. Strangely, the session's commands
> ARE
> > SAVED though! Also I can read the history contents in the psql session,
> as
> > the following raw output shows:
> > ```
> > levqa=> \echo `echo $PSQL_HISTORY`
> > /.psql_history
> > levqa=> \echo `tail $PSQL_HISTORY`
> > _HiStOrY_V2_
> > _HiStOrY_V2_
> > _HiStOrY_V2_
> > _HiStOrY_V2_
> > echo\040HISTCONTROL\012;
> > `echo\040HISTCONTROL`\012;
> > \134echo\040:HISTCONTROL
> > \134echo\040:HISTFILE
> > \134set\040HISTFILE\040/.psql_history
> > \134echo\040:HISTFILE
> > levqa=>
> > ```
>
> No concrete ideas to offer, but I'm pretty sure that that history-file
> format is only supposed to have one "_HiStOrY_V2_" marker line at the
> start. Maybe getting rid of the extras would de-confuse it.
>
> Anyway, none of Postgres' own code touches that file. If there's a
> bug here, it's in libedit.
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Roman | 2021-04-09 06:52:10 | Update locks the row even if there is no row to update |
Previous Message | Tom Lane | 2021-04-08 16:04:35 | Re: BUG #16956: psql won't load command history |