Re: Assertions in PL/PgSQL
От | Pavel Stehule |
---|---|
Тема | Re: Assertions in PL/PgSQL |
Дата | |
Msg-id | CAFj8pRCO7-137HCXNOsgX60AroyXv0NW5Ks=iByWEi5eqW-fow@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Assertions in PL/PgSQL (Marko Tiikkaja <marko@joh.to>) |
Список | pgsql-hackers |
2013/9/23 Marko Tiikkaja <marko@joh.to>
On 9/23/13 6:40 AM, Pavel Stehule wrote:It looks like I'm losing this battle, but this syntax isn't too bad.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
I don't win too, but result is good :)
This sounds like a decent enhancement.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 idea is good, I like it.p.s. clause WHEN can be used for other exception level - so it can be a
interesting shortcut for other use cases.
I could prepare a patch for this, unless someone else wants to?
please, do it.
Regards
Pavel
Pavel
Regards,
Marko Tiikkaja
В списке pgsql-hackers по дате отправления: