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: 201008122205.o7CM5Y2J050600@wwwmaster.postgresql.org (view raw or flat)
Thread:
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
Details: 

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.

Responses

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-2014 The PostgreSQL Global Development Group