Re: Assertions in PL/PgSQL

From: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
To: Marko Tiikkaja <marko(at)joh(dot)to>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Assertions in PL/PgSQL
Date: 2013-09-14 19:55:15
Message-ID: CAJKUy5i2DFDYmQ2MmVnyb4ZrPJOLk1WBsnOox3KKcbGi+d4H-w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Sep 14, 2013 at 1:52 PM, Marko Tiikkaja <marko(at)joh(dot)to> wrote:
> On 14/09/2013 20:47, I wrote:
>>
>> These are
>> similar to the Assert() backend macro: they can be disabled during
>> compile time, but when enabled, abort execution if the passed expression
>> is not true.
>

Hi,

That's very good, thanks.

>
> And by "compile time" here, I mean at the time when the PL/PgSQL function
is
> compiled, not the postgres server binary.
>

and "compile time" means when the function is created or replaced? or the
first time is used?

if the second. Why not have a plpgsql.enable_assert variable?
A directive you can use per function

then i can keep the ASSERT and activate them by replacing the function

--
Jaime Casanova www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación
Phone: +593 4 5107566 Cell: +593 987171157

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2013-09-14 20:00:09 Re: git apply vs patch -p1
Previous Message Andrew Dunstan 2013-09-14 19:23:37 json docs fixup