Re: see previous queries

From: "Glenn Wiorek" <gwiorek(at)jmlafferty(dot)com>
To: "Ashok Chauhan" <ashok(at)kalculate(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: see previous queries
Date: 2003-12-04 14:29:18
Message-ID: 006f01c3ba73$008be780$143264c8@jmlafferty.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> problem:- in postgresql there is any command to see history (previous
> day queries) like as history command in linux.

In addition to server and client logging levels adjusted via the
postgresql.config file, psql also has a
command history like bash that is preserved between sessions. The command
history of psql
can be adjusted by setting variables in the ~/.psqlrc config file. See the
PostgresSQL
reference document for more info on psql.

http://www.postgresql.org/docs/current/static/app-psql.html
http://www.postgresql.org/docs/current/interactive/app-psql.html

Some examples below:

HISTCONTROL
If this variable is set to ignorespace, lines which begin with a space are
not entered into the history

list. If set to a value of ignoredups, lines matching the previous history
line are not entered. A value

of ignoreboth combines the two options. If unset, or if set to any other
value than those above, all

lines read in interactive mode are saved on the history list.

Note: This feature was shamelessly plagiarized from bash.

HISTSIZE

The number of commands to store in the command history. The default value is
500.

Note: This feature was shamelessly plagiarized from bash.

----- Original Message -----
From: "Ashok Chauhan" <ashok(at)kalculate(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Sent: Thursday, December 04, 2003 1:13 AM
Subject: [ADMIN] see previous queries

>
>
> hi
> i am a new user in postgresql.
> problem:- in postgresql there is any command to see history (previous
> day queries) like as history command in linux.
> thank you
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Andrei Bintintan 2003-12-04 14:57:51 Index not used. WHY?
Previous Message Bruce Momjian 2003-12-04 12:16:03 Re: incremental backup