Re: [PATCH] SQL function to report log message

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: dinesh kumar <dineshkumar02(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David Fetter <david(at)fetter(dot)org>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] SQL function to report log message
Date: 2015-10-22 21:42:29
Message-ID: CAFj8pRAgjhHbW-p=BaPZ-OCqXxJmS7u8p3HQ=dMp3pd8tJhqnQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

2015-10-22 22:03 GMT+02:00 Peter Eisentraut <peter_e(at)gmx(dot)net>:

> On 10/22/15 3:20 AM, dinesh kumar wrote:
> > postgres=# SELECT pg_report_log('INFO', 'NULL', false, NULL, NULL);
> > INFO: NULL
> >
> > postgres=# SELECT pg_report_log('INFO', 'NULL', false, 'NULL', 'NULL');
> > INFO: NULL
> > DETAIL: NULL /-- Are you suggesting to change this behaviour/
> > HINT: NULL
>
> These look wrong to me.
>
> I'd throw an error if a null message is passed.
>
> (Not particularly in favor of this patch, but just saying ...)
>
>
We talked about this behave - and in this case, I am thinking the any
fields with same value with default value should be ignored.

the behave of pg_report_log should not be exactly same as RAISE statement
in PLpgSQL. If this function will be exactly same, then it lost a sense and
anybody can use RAISE statement. RAISE statement is strict - in this moment
to strict (can be little bit less), and pg_report_log can be NULL tolerant.
It is limmited by our implementation of keyword parameters that needs some
default value.

Regards

Pavel

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2015-10-22 21:42:48 Re: Avoid full page images in streaming replication?
Previous Message Tom Lane 2015-10-22 21:38:38 Re: Avoid full page images in streaming replication?