Skip site navigation (1) Skip section navigation (2)

BUG #5616: psql Doesn't Change Log files on \c

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5616: psql Doesn't Change Log files on \c
Date: 2010-08-12 22:05:34
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      5616
Logged by:          David E. Wheeler
Email address:      david(at)kineticode(dot)com
PostgreSQL version: 8.4
Operating system:   Mac OS X 10.6.4
Description:        psql Doesn't Change Log files on \c

I have this in my .psqlrc:

    \set HISTFILE ~/.psql_history- :DBNAME

This is great, except when I change databases in a session:

    % psql foo
    foo % \c bar
    You are now connected to database "bar".
    SELECT true;

The last statement will be logged to ~/.psql_history-foo when it should go
to ~/.psql_history-bar.


pgsql-bugs by date

Next:From: Tom LaneDate: 2010-08-12 22:33:13
Subject: Re: BUG #5616: psql Doesn't Change Log files on \c
Previous:From: Scott WheelerDate: 2010-08-12 21:52:41
Subject: Re: BUG #5613: cannot delete

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group