| From: | Corey Huinker <corey(dot)huinker(at)gmail(dot)com> |
|---|---|
| To: | Jonathan Jacobson <jonjac(at)gmail(dot)com> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Multiple psql history files |
| Date: | 2016-10-18 16:32:22 |
| Message-ID: | CADkLM=f1pkL4YXiM8GR+23ohtktuwaiL0gQJK3WBxTmV6+jw8w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Oct 18, 2016 at 12:26 PM, Jonathan Jacobson <jonjac(at)gmail(dot)com>
wrote:
> The .psql_history file is naturally used by different DB connections
> (distinguished by a different combination of host + port + database + user).
> At least in my multi-database working environment, this leads sometimes to
> frustration because there are commands that cannot or should not be used by
> different connections.
> To solve this, psql could keep a separate command history file for each
> connection.
> I will be happy to make this my first contribution to PostgreSQL's code.
> What do you say?
>
> Regards,
> Jonathan
>
That's settable with HISTFILE
\set HISTFILE ~/.psql_history- :DBNAME
There's also :PORT and a few other vars.
(example borrowed from
http://stackoverflow.com/questions/17924906/where-is-psql-client-history-kept-psql-history-non-existant
)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David G. Johnston | 2016-10-18 16:32:53 | Re: Multiple psql history files |
| Previous Message | Jonathan Jacobson | 2016-10-18 16:26:35 | Multiple psql history files |