Re: [PATCH] SQL function to report log message

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [PATCH] SQL function to report log message
Дата
Msg-id CAB7nPqQAsnwPQFpQ=CRETf-i8yY0wDBfsL_x81YYQw8nWBYGQg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] SQL function to report log message  (dinesh kumar <dineshkumar02@gmail.com>)
Ответы Re: [PATCH] SQL function to report log message  (dinesh kumar <dineshkumar02@gmail.com>)
Список pgsql-hackers
On Thu, Jul 23, 2015 at 10:56 AM, dinesh kumar <dineshkumar02@gmail.com> wrote:
> Hi All,
>
> On Mon, Jul 13, 2015 at 2:12 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>
>> Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
>> > On 7/13/15 3:39 PM, dinesh kumar wrote:
>> >> Ah. It's' my bad interpretation. Let me work on it, and will send a new
>> >> patch as a wrapper sql function for ereport.
>>
>> > You might want to present a plan for that; it's not as trivial as it
>> > sounds due to how ereport works. In particular, I'd want to see (at
>> > minimum) the same functionality that plpgsql's RAISE command now
>> > provides (errdetail, errhint, etc).
>>
>
> Jim,
>
> For now, I  worked on (ERROR Level, ERROR Message, HIDE ERROR Stmt). In our
> to do item description, I found this wrapper needs to return "Anyelement".
> But, I believe, return "VOID" is enough for this function. Let me know if I
> erred here.
>
> In design phase,
>
> 1. I took a CustomDataType with the elevel code, elevel text
>
> 2. Populated this CDT with all existing pre-processors, except {FATAL,
> PANIC}. Since, we don't expose these to client.
>
> 3. By matching the user elevel text, processing the report log function.
>
> Find the attached patch with implementation.

Btw, if you want to get more attention for your patch as well as
reviews, you should consider registering to the next commit fest of
September:
https://commitfest.postgresql.org/6/
Regards,
-- 
Michael



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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: RFC: replace pg_stat_activity.waiting with something more descriptive
Следующее
От: dinesh kumar
Дата:
Сообщение: Re: [PATCH] SQL function to report log message