Re: Commands history with psql in a Windows command line shell

From: Lmhelp1 <lmhelp1(at)orange(dot)fr>
To: Melvin Davidson <melvin6925(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Commands history with psql in a Windows command line shell
Date: 2016-08-02 15:40:38
Message-ID: ea9b4cb7-8677-f83c-7657-a6f751ce07c3@orange.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you for your answer.

cmd.exe> psql --version
psql (PostgreSQL) 9.5.2

Like I wrote, the Windows OS is 8.1 Pro.

Best regards,
--
Léa Massiot

On 2016-08-02 5:31 PM, Melvin Davidson wrote:
> Are you doing this in PostgreSQL 7.3 and Windows XP? Can you provide
> us with a little more useful information like current PostgreSQL
> version and O/S?
> Otherwise we have absolutely no idea what the problem might be.
>
> On Tue, Aug 2, 2016 at 11:18 AM, Lmhelp1 <lmhelp1(at)orange(dot)fr
> <mailto:lmhelp1(at)orange(dot)fr>> wrote:
>
> Hello,
>
> I am using "psql" in "cmd.exe" in Windows (8.1).
>
> Below is the command I use to connect to a database with "psql":
> cmd.exe> psql -p <tcp_port> -U <username> <database_name>
>
> My problem is the following.
> Suppose I enter one command:
> <database_name># SELECT * FROM <a_table_1>;
> and then another one:
> <database_name># SELECT * FROM <a_table_2>;
> The commands history "is not working": meaning I cannot retrieve
> these last two commands I entered by hitting the top arrow key.
> Instead, I have to type them again.
>
> To try to solve the problem, I entered the command:
> <database_name># \set HISTSIZE 100
> but it didn't change anything.
>
> Yesterday, I don't remember what I did, but I could access the
> commands history using Powershell, maybe the command "\set
> HISTSIZE 100" and maybe a "psqlrc" file.
> But whatever I've been trying to do since, I can't make it work again.
>
> Can you please advise me what to do to make this work?
>
> Best regards.
> --
> Léa Massiot
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org
> <mailto:pgsql-general(at)postgresql(dot)org>)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
>
>
>
> --
> *Melvin Davidson*
> I reserve the right to fantasize. Whether or not you
> wish to share my fantasy is entirely up to you.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Melvin Davidson 2016-08-02 15:56:54 Re: Commands history with psql in a Windows command line shell
Previous Message David G. Johnston 2016-08-02 15:40:37 Re: Commands history with psql in a Windows command line shell