[PATCH] SQL function to report log message

Поиск
Список
Период
Сортировка
От dinesh kumar
Тема [PATCH] SQL function to report log message
Дата
Msg-id CALnrH7ocp-v5Zvs03_z-PMZgs8N1bB9t=AK_WkPenFK7NA_WBw@mail.gmail.com
обсуждение исходный текст
Ответы Re: [PATCH] SQL function to report log message  (Michael Paquier <michael.paquier@gmail.com>)
Re: [PATCH] SQL function to report log message  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Hi All,

Greetings for the day.

Would like to discuss on below feature here.

Feature:
    Having an SQL function, to write messages to log destination.

Justification:
    As of now, we don't have an SQL function to write custom/application messages to log destination. We have "RAISE" clause which is controlled by
log_ parameters. If we have an SQL function which works irrespective of log settings, that would be a good for many log parsers. What i mean is, in DBA point of view, if we route all our native OS stats to log files in a proper format, then we can have our log reporting tools to give most effective reports. Also, Applications can log their own messages to postgres log files, which can be monitored by DBAs too.

Implementation:
    Implemented a new function "pg_report_log" which takes one argument as text, and returns void. I took, "LOG" prefix for all the reporting messages.I wasn't sure to go with new prefix for this, since these are normal LOG messages. Let me know, if i am wrong here.

Here is the attached patch.

Regards,
Dinesh
manojadinesh.blogspot.com
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: [PATCH] Generalized JSON output functions
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [PATCH] SQL function to report log message