Re: PL/pgSQL, RAISE and error context

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PL/pgSQL, RAISE and error context
Date: 2015-01-26 12:02:05
Message-ID: 54C62CBD.4020006@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/22/15 6:03 PM, Pavel Stehule wrote:
> 2015-01-22 12:37 GMT+01:00 Marko Tiikkaja <marko(at)joh(dot)to>:
>> Or is that a stupid idea? I just think hacking libpq for something like
>> this is a huge overkill.
>>
>
> I don't think so only plpgsql solution is satisfactory idea. There are
> some mix plpgsql / plperl ... application - and it isn't possible to remove
> error context from only one language.

Yeah, not in libpq it isn't. Thing is, PL/PgSQL already is the
exception here, since it's the only language which does this error
message suppression. So if people did think this suppression was a good
idea, only the people using PL/PgSQL were vocal enough to get the
behavior changed. I'm not looking to change that.

I can see where it's a lot nicer not to have the context visible for
people who only care about the contents of the message, but the way it's
done in PL/PgSQL right now is just not good enough. On the other hand,
the backwards compatibility breakage of doing this in libpq is quite
extensive. The most simple option seems to be to just allow a GUC to
change PL/PgSQL's behavior to match what all other PLs are doing.

.marko

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2015-01-26 12:14:07 Re: PL/pgSQL, RAISE and error context
Previous Message Andres Freund 2015-01-26 11:09:31 Re: longjmp clobber warnings are utterly broken in modern gcc