Re: BUG #14037: Move history file

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: vendforce(at)gmail(dot)com
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14037: Move history file
Date: 2016-03-21 15:50:16
Message-ID: CAKFQuwaV41a5c6z6_ws=JS_QqceU6uJ44VEYPHsY6S5Hni=Avg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sun, Mar 20, 2016 at 8:55 AM, <vendforce(at)gmail(dot)com> wrote:

> The following bug has been logged on the website:
>
> Bug reference: 14037
> Logged by: vendforce
> Email address: vendforce(at)gmail(dot)com
> PostgreSQL version: 9.5.1
> Operating system: linux
> Description:
>
> I want to move the .psql_history file that resides in $home
>
> In mysql you can do
> export MSQL_HISTDFILE=/newfolder/mysq_history,
> and the history file is created and remains in the exported string
>
> Id tried that with PYSQL_HISTFILE & PSQL_HISTFILE and it doesnt work
>
> Is there a way to move the history file to a different folder
>

​This is not a bug and it is documented in psql's documentation chapter -
so not exactly non-intuitive.

http://www.postgresql.org/docs/9.2/static/app-psql.html

​The only thing that might be surprising is that you actually have to
change it inside of psql (either via CLI option or meta-command) as opposed
to setting a shell environment variable.

David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2016-03-21 15:51:51 Re: BUG #14037: Move history file
Previous Message bricklen 2016-03-21 15:49:21 Re: BUG #14037: Move history file