Re: [PATCH] SQL function to report log message

From: dinesh kumar <dineshkumar02(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] SQL function to report log message
Date: 2015-07-23 04:13:52
Message-ID: CALnrH7pxXcKPbuRmsemWEpofxE2EWJHgQDWiYPV2whSWV6aBZw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 22, 2015 at 8:56 PM, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
wrote:

> On Thu, Jul 23, 2015 at 10:56 AM, dinesh kumar <dineshkumar02(at)gmail(dot)com>
> wrote:
> > Hi All,
> >
> > On Mon, Jul 13, 2015 at 2:12 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >>
> >> Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)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.
>
>
Thanks Michael.

Uploaded my patch there.

Regards,
Dinesh
manojadinesh.blogspot.com

> 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
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kouhei Kaigai 2015-07-23 04:15:43 Re: Queries runs slow on GPU with PG-Strom
Previous Message Michael Paquier 2015-07-23 03:56:15 Re: [PATCH] SQL function to report log message