From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | "Hogan, James F(dot) Jr(dot)" <JHogan(at)seton(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: audit table containing Select statements submitted |
Date: | 2006-05-12 18:05:33 |
Message-ID: | 4464CE6D.5030003@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Josh Berkus wrote:
>
> Secondly, you can use the log. We've discussed on this list making it
> possible to log in CSV, XML or other database-digestable format.
> Unfortuantely, there doesn't appear to be much momentum behind that; I
> don't know that anyone is writing any code presently. Sponsorship?
>
Well, let's think about it some first, before we line up $$ :-)
We really have 3 bits of the log: the prefix, the tag, and the message.
Turning the prefix into whatever is needed is in the hands of the user.
We could provide a corresponding log_line_suffix to allow XML element
completion if necessary. The tag could likewise easily be XMLized (or
CSVized, or whatever). The real problem is the message, which is now
from the logging code's point of view basically an opaque string.
Changing that would be a massive undertaking, especially when you think
of the effect on the translators. And first we would need to come up
with a set of fields, or several sets of fields, that we wanted to use.
The reason I haven't gone down this road, and just did log_line_prefix,
is that it strikes me as too inflexible. I think postprocessing is
probably a better way to go, and just leave the messages opaque from
postgres' point of view. If someone has a better proposal, let's see an
example of how all the various messages would be handled.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2006-05-12 18:20:41 | Re: audit table containing Select statements submitted |
Previous Message | Joshua D. Drake | 2006-05-12 17:52:30 | Re: audit table containing Select statements submitted |