Re: Assertions in PL/PgSQL

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: Amit Khandekar <amit(dot)khandekar(at)enterprisedb(dot)com>
Cc: Jaime Casanova <jaime(at)2ndquadrant(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Assertions in PL/PgSQL
Date: 2013-09-20 10:17:27
Message-ID: 523C20B7.3090606@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 9/20/13 12:09 PM, Amit Khandekar wrote:
> On 16 September 2013 03:43, Marko Tiikkaja <marko(at)joh(dot)to> wrote:
>> I think it would be extremely surprising if a command like that got
>> optimized away based on a GUC, so I don't think that would be a good idea.
>
>
> In pl_gram.y, in the rule stmt_raise, determine that this RAISE is for
> ASSERT, and then return NULL if plpgsql_curr_compile->enable_assertions is
> false. Isn't this possible ?

Of course it's possible. But I, as a PostgreSQL user writing PL/PgSQL
code, would be extremely surprised if this new cool option to RAISE
didn't work for some reason. If we use ASSERT the situation is
different; most people will realize it's a new command and works
differently from RAISE.

Regards,
Marko Tiikkaja

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2013-09-20 10:21:28 Re: record identical operator - Review
Previous Message Martijn van Oosterhout 2013-09-20 10:10:39 Re: UTF8 national character data type support WIP patch and list of open issues.