Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List of queries in psql

Status
Not open for further replies.

blakeoldride

Programmer
Dec 14, 2004
1
US
Hello everyone!

Running Postgresql 7.4 (I think) in psql is it possible to view a list of the most recent queries run against a particular DB?

I can get the most recent in .psql_history but this is for queries used in the psql monitor, I am after queries that were made against the system from the web sever or user? Is this information logged or stored anywhere?

Thanks All!
 
you can see this, but not with psql, there you can see the version by the way if you are unsure

select version();


if you realy use 7.4 then see here

you have to change the configuration parameters, the important for you is log_statement

then you will see in the DB logs the statements that are executed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top