Log the SQL Statements

Started by David Busbyabout 23 years ago4 messagesgeneral
Jump to latest
#1David Busby
busby@edoceo.com

List,
How do I configure PostgreSQL to log all inbound SQL queries/statements?
I've been up and down through debug levels, and other config stuff but can't
find it. Any ideas?

/B

#2Bruce Momjian
bruce@momjian.us
In reply to: David Busby (#1)
Re: Log the SQL Statements

In 7.3, it is log_statement.

---------------------------------------------------------------------------

David Busby wrote:

List,
How do I configure PostgreSQL to log all inbound SQL queries/statements?
I've been up and down through debug levels, and other config stuff but can't
find it. Any ideas?

/B

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

-- 
  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, Pennsylvania 19073
#3Dennis Gearon
gearond@cvc.net
In reply to: Bruce Momjian (#2)
Re: Log the SQL Statements

Is that a command, a setting, what?

Bruce Momjian wrote:

Show quoted text

In 7.3, it is log_statement.

---------------------------------------------------------------------------

David Busby wrote:

List,
How do I configure PostgreSQL to log all inbound SQL queries/statements?
I've been up and down through debug levels, and other config stuff but can't
find it. Any ideas?

/B

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

#4Bruce Momjian
bruce@momjian.us
In reply to: Dennis Gearon (#3)
Re: Log the SQL Statements

It can be used via SET per session, or changed in postgresql.conf to
affect all sessions.

---------------------------------------------------------------------------

Dennis Gearon wrote:

Is that a command, a setting, what?

Bruce Momjian wrote:

In 7.3, it is log_statement.

---------------------------------------------------------------------------

David Busby wrote:

List,
How do I configure PostgreSQL to log all inbound SQL queries/statements?
I've been up and down through debug levels, and other config stuff but can't
find it. Any ideas?

/B

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

-- 
  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, Pennsylvania 19073