Thread: Query history file

Query history file

From
Mauro Bertoli
Date:
Hi, I've installed a Postgres 8.0. 
There's a history file with all executed queries?
Thanks!

    
___________________________________ 
Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam, Giochi, Rubrica… Scaricalo ora! 
http://it.messenger.yahoo.it


Re: Query history file

From
Bruce Momjian
Date:
Mauro Bertoli wrote:
> Hi, 
>  I've installed a Postgres 8.0. 
> There's a history file with all executed queries?

If you are using psql, \s will show you your old queries.  From the
server side, if you enable 'log_statement' all queries will go into the
server logs.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


Re: Query history file

From
PFC
Date:
~/.psql_history is everything you typed in psql

On Sat, 02 Apr 2005 01:42:05 +0200, Mauro Bertoli <bertolima@yahoo.it>  
wrote:

> Hi,
>  I've installed a Postgres 8.0.
> There's a history file with all executed queries?
> Thanks!
>
>
>         
> ___________________________________
> Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar,  
> Webcam, Giochi, Rubrica… Scaricalo ora!
> http://it.messenger.yahoo.it
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>




Re: Query history file

From
Mauro Bertoli
Date:
> From the
> server side, if you enable 'log_statement' all
> queries will go into the
> server logs.
Thank you, I enabled 
log_statement = all
log_duration = true

It's beautiful! :)

    
___________________________________ 
Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam, Giochi, Rubrica… Scaricalo ora! 
http://it.messenger.yahoo.it


Re: Query history file

From
Vivek Khera
Date:
On Apr 5, 2005, at 11:29 AM, Mauro Bertoli wrote:

>> From the
>> server side, if you enable 'log_statement' all
>> queries will go into the
>> server logs.
> Thank you, I enabled
> log_statement = all
> log_duration = true

You may also want

log_min_error_statement = error

else any statement that causes an error (such as a typo) will not be 
logged -- just the error gets logged.  Makes debugging of very complex 
systems much easier to be able to see the full query that caused the 
problem.

Vivek Khera, Ph.D.
+1-301-869-4449 x806