Thread: BUG #14037: Move history file
The following bug has been logged on the website: Bug reference: 14037 Logged by: vendforce Email address: vendforce@gmail.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
On Sun, Mar 20, 2016 at 8:55 AM, <vendforce@gmail.com> wrote: > The following bug has been logged on the website: > > Bug reference: 14037 > Logged by: vendforce > Email address: vendforce@gmail.com > PostgreSQL version: 9.5.1 > Operating system: linux > Description: > > I want to move the .psql_history file that resides in $home > > 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 > The docs list "PSQL_HISTORY" as the environment variable to edit ( http://www.postgresql.org/docs/current/static/app-psql.html.
On Sun, Mar 20, 2016 at 8:55 AM, <vendforce@gmail.com> wrote: > The following bug has been logged on the website: > > Bug reference: 14037 > Logged by: vendforce > Email address: vendforce@gmail.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=3D/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 > =E2=80=8BThis is not a bug and it is documented in psql's documentation cha= pter - so not exactly non-intuitive. http://www.postgresql.org/docs/9.2/static/app-psql.html =E2=80=8BThe 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.
On Mon, Mar 21, 2016 at 8:50 AM, David G. Johnston < david.g.johnston@gmail.com> wrote: > On Sun, Mar 20, 2016 at 8:55 AM, <vendforce@gmail.com> wrote: > >> The following bug has been logged on the website: >> >> Bug reference: 14037 >> Logged by: vendforce >> Email address: vendforce@gmail.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=3D/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 >> > > =E2=80=8BThis is not a bug and it is documented in psql's documentation c= hapter - > so not exactly non-intuitive. > > http://www.postgresql.org/docs/9.2/static/app-psql.html > > =E2=80=8BThe only thing that might be surprising is that you actually hav= e to > change it inside of psql (either via CLI option or meta-command) as oppos= ed > to setting a shell environment variable. > > =E2=80=8Bedit: apparently didn't scroll down far enough - bricklen is corre= ct about their ALSO being a shell environment variable. Dav =E2=80=8Bid J.