ossc-db / pgaudit

PostgreSQL Audit Extension
Other
2 stars 4 forks source link

SQLSTATE output and filtering #21

Open harada-toshi opened 7 years ago

harada-toshi commented 7 years ago

In the Advanced branch, the audit log of CLASS = ERROR is output unless it is "00" by judging the error class of SQLSTATE.

By adding the following functions, it is possible to output a specific error (eg permittion denied error) to the audit log.

How is it?

MasahikoSawada commented 7 years ago

I agree with adding SQLSTATE to output format, but I don't see whether we should add it as a filter option because I guess that there isn't lot peoples who want to filter the audit log by SQLSTATE. Thought?

BTW currently pgaudit filter the error log by the error string which could be not small overhead and makes the code maintenance harder but I think that we can do the same more faster and lighter by using SQLSTATE.