From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Marko Tiikkaja <marko(at)joh(dot)to> |
Cc: | Jaime Casanova <jaime(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Amit Khandekar <amit(dot)khandekar(at)enterprisedb(dot)com> |
Subject: | Re: Assertions in PL/PgSQL |
Date: | 2013-09-23 08:57:01 |
Message-ID: | CAFj8pRCO7-137HCXNOsgX60AroyXv0NW5Ks=iByWEi5eqW-fow@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2013/9/23 Marko Tiikkaja <marko(at)joh(dot)to>
> On 9/23/13 6:40 AM, Pavel Stehule wrote:
>
>> After days I am thinking so it can be a good solution
>>
>> syntax - enhanced current RAISE
>>
>> RAISE ASSERT WHEN boolean expression
>>
>> RAISE ASSERT 'some message' WHEN expression
>>
>
> It looks like I'm losing this battle, but this syntax isn't too bad.
I don't win too, but result is good :)
>
>
> and we can have a GUC that controls asserts per database - possibly
>> overwritten by plpgsql option - similar to current plpgsql options
>>
>> assert_level = [*ignore*, notice, warning, error]
>>
>
> This sounds like a decent enhancement.
>
>
> p.s. clause WHEN can be used for other exception level - so it can be a
>> interesting shortcut for other use cases.
>>
>
> This idea is good, I like it.
>
>
> I could prepare a patch for this, unless someone else wants to?
>
>
please, do it.
Regards
Pavel
>
>
> Regards,
> Marko Tiikkaja
>
From | Date | Subject | |
---|---|---|---|
Next Message | Marko Tiikkaja | 2013-09-23 09:00:50 | Re: Assertions in PL/PgSQL |
Previous Message | Marko Tiikkaja | 2013-09-23 08:50:08 | Re: Assertions in PL/PgSQL |