From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Marko Tiikkaja <marko(at)joh(dot)to> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: plpgsql - Assert statement |
Date: | 2014-11-26 18:52:49 |
Message-ID: | CAFj8pRDFo+3mnAXA3QO2KMUvJ-CLtRWwLEZeuMypU3V65213rg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi
2014-11-26 16:46 GMT+01:00 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
>
>
> 2014-11-26 13:31 GMT+01:00 Marko Tiikkaja <marko(at)joh(dot)to>:
>
>> On 11/26/14 8:55 AM, Pavel Stehule wrote:
>>
>>> * should be assertions globally enabled/disabled? - I have no personal
>>> preference in this question.
>>>
>>
>> I think so. The way I would use this function is to put expensive checks
>> into strategic locations which would only run when developing locally (and
>> additionally perhaps in one of the test environments.) And in that case
>> I'd like to globally disable them for the live environment.
>>
>
> ok
>
>
>>
>> * can be ASSERT exception handled ? - I prefer this be unhandled
>>> exception
>>> - like query_canceled because It should not be masked by plpgsql
>>> EXCEPTION
>>> WHEN OTHERS ...
>>>
>>
>> I don't care much either way, as long as we get good information about
>> what went wrong. A stack trace and hopefully something like
>> print_strict_params for parameters to the "expr".
>>
>
> There is more ways, I can live with both
>
here is proof concept
what do you think about it?
Regards
Pavel
>
> Pavel
>
>
>
>>
>>
>> .marko
>>
>
>
Attachment | Content-Type | Size |
---|---|---|
assert-poc.patch | text/x-patch | 10.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2014-11-26 19:01:19 | GSSAPI, SSPI - include_realm default |
Previous Message | Alex Shulgin | 2014-11-26 18:52:46 | Re: [PATCH] add ssl_protocols configuration option |