By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,933 Members | 1,676 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,933 IT Pros & Developers. It's quick & easy.

Logging all queries

P: n/a
Hi All,

Is there any way to log (save) "all" the queries
(select, insert, updade, everything) executed on a
database, in a table??

Regards,

Marcelo

__________________________________________________ ____________________

Yahoo! GeoCities: a maneira mais fácil de criar seu web site grátis!
http://br.geocities.yahoo.com/

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
you can set the log_statement parameter to true in the configuration
file ($PGDATA/postgresql.conf).

On Tue, 2004-01-27 at 16:39, MaRCeLO PeReiRA wrote:
Hi All,

Is there any way to log (save) "all" the queries
(select, insert, updade, everything) executed on a
database, in a table??

Regards,

Marcelo

__________________________________________________ ____________________

Yahoo! GeoCities: a maneira mais fácil de criar seu web site grátis!
http://br.geocities.yahoo.com/

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQBAFsGH21dVnhLsBV0RAlNDAJ9AgMvxTOFJYz3sqPZK5/ZRnDQD4ACcChTF
hcE7mr3sKpyU0fjBOKGuqv4=
=eXVa
-----END PGP SIGNATURE-----

Nov 22 '05 #2

P: n/a
Hi Franco,

If I set 'log_statement=true', will *all* the queries
sent to the backend be logged???

In which table will it be used to do this log??

Regards,

Marcelo

--- Franco Bruno Borghesi
<fr****@akyasociados.com.ar> escreveu: > you can set
the log_statement parameter to true in
the configuration
file ($PGDATA/postgresql.conf).

On Tue, 2004-01-27 at 16:39, MaRCeLO PeReiRA wrote:
Hi All,

Is there any way to log (save) "all" the queries
(select, insert, updade, everything) executed on a
database, in a table??

Regards,

Marcelo

__________________________________________________ ____________________

Yahoo! GeoCities: a maneira mais fácil de criar

seu web site grátis!
http://br.geocities.yahoo.com/

---------------------------(end of

broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

ATTACHMENT part 2 application/pgp-signature

name=signature.asc
__________________________________________________ ____________________

Yahoo! GeoCities: a maneira mais fácil de criar seu web site grátis!
http://br.geocities.yahoo.com/

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 22 '05 #3

P: n/a
Hi All,

I have set [log_statement=true] in the postgresql.conf
file and now I have all the statements logged. But,
there is a problem:

Once I have more than one database, I had to know in
which database a statement was executed on.

The log file is full of: "select * from stuff", but as
I have more than one database, how can I know where
the [stuff] table is??????

Regards,

Marcelo

--- MaRCeLO PeReiRA <ga********@yahoo.com.br>
escreveu: > Hi Franco,

If I set 'log_statement=true', will *all* the
queries
sent to the backend be logged???

In which table will it be used to do this log??

Regards,

Marcelo

--- Franco Bruno Borghesi
<fr****@akyasociados.com.ar> escreveu: > you can set
the log_statement parameter to true in
the configuration
file ($PGDATA/postgresql.conf).

On Tue, 2004-01-27 at 16:39, MaRCeLO PeReiRA wrote:
Hi All,

Is there any way to log (save) "all" the queries
(select, insert, updade, everything) executed on a database, in a table??

Regards,

Marcelo

__________________________________________________ ____________________

Yahoo! GeoCities: a maneira mais fácil de criar

seu web site grátis!
http://br.geocities.yahoo.com/

---------------------------(end of

broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

ATTACHMENT part 2 application/pgp-signature

name=signature.asc

__________________________________________________ ____________________
Yahoo! GeoCities: a maneira mais fácil de criar seu
web site grátis!
http://br.geocities.yahoo.com/

---------------------------(end of
broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to

ma*******@postgresql.org

__________________________________________________ ____________________

Yahoo! GeoCities: a maneira mais fácil de criar seu web site grátis!
http://br.geocities.yahoo.com/

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.