Re: [PATCH] SQL function to report log message

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: 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>, Robert Haas <robertmhaas(at)gmail(dot)com>, dinesh kumar <dineshkumar02(at)gmail(dot)com>, 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-18 19:13:15
Message-ID: 5623EF4B.3070101@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/17/15 11:49 AM, Pavel Stehule wrote:
> 2015-10-17 18:42 GMT+02:00 Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com
> <mailto:Jim(dot)Nasby(at)bluetreble(dot)com>>:
>
> On 10/15/15 11:51 PM, Pavel Stehule wrote:
>
> I don't think so ignoring NULL in RAISE statement is good idea
> (it is
> not safe). We can replace NULL by some string (like "NULL") by
> default.
> I am thinking about other possibilities.
>
>
> What I was trying to say is that if the argument to a USING option
> is NULL then RAISE should skip over it, as if it hadn't been applied
> at all. Similar to how the code currently tests for \0.
>
>
> I understand, but I don't prefer this behave. The NULL is strange value
> and should be signalized.

So instead of raising the message we wanted, we throw a completely
different exception? How does that make sense?

More to the point, if RAISE operated this way then it would be trivial
to create a fully functional plpgsql wrapper around it.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shay Rojansky 2015-10-18 20:56:12 Re: Allow ssl_renegotiation_limit in PG 9.5
Previous Message Peter Geoghegan 2015-10-18 18:52:30 Re: More work on SortSupport for text - strcoll() and strxfrm() caching