Re: Assertions in PL/PgSQL

Поиск
Список
Период
Сортировка
От Jaime Casanova
Тема Re: Assertions in PL/PgSQL
Дата
Msg-id CAJKUy5g-VCMF65JDuCnxdSYWLr5SJEROqvtuGd_+eiE+2dDnbg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Assertions in PL/PgSQL  (Marko Tiikkaja <marko@joh.to>)
Список pgsql-hackers
<p><br /> El 14/09/2013 15:18, "Marko Tiikkaja" <<a href="mailto:marko@joh.to">marko@joh.to</a>> escribió:<br />
><br/> > On 2013-09-14 21:55, Jaime Casanova wrote:<br /> >><br /> >> On Sat, Sep 14, 2013 at 1:52
PM,Marko Tiikkaja <<a href="mailto:marko@joh.to">marko@joh.to</a>> wrote:<br /> >>><br /> >>>
Andby "compile time" here, I mean at the time when the PL/PgSQL function<br /> >><br /> >> is<br />
>>><br/> >>> compiled, not the postgres server binary.<br /> >>><br /> >><br />
>>and "compile time" means when the function is created or replaced? or the<br /> >> first time is used?<br
/>><br /> ><br /> > Uhh..  I have to admit, I'm not sure.  I think this would be when you CREATE the function
forthe backend that created the function, and on the first call in other backends.<br /> ><br /> ><br /> >>
ifthe second. Why not have a plpgsql.enable_assert variable?<br /> >> A directive you can use per function<br />
>><br/> >> then i can keep the ASSERT and activate them by replacing the function<br /> ><br /> ><br
/>> The patch supports a "compiler option" to override the global option and enable it per function:<br /> ><br
/>> create function foof()<br /> > returns void<br /> > as $$<br /> > #enable_assertions<br /> >
begin<br/> > -- failure<br /> > assert 1 > 2;<br /> > end<br /> > $$ language plpgsql;<br /> ><br />
><br/> > Does this address your wishes?<br /> ><br /> ><p>That's exactly what i wanted. thanks<p>--<br />
JaimeCasanova<br /> 2ndQuadrant: Your PostgreSQL partner  

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Assertions in PL/PgSQL
Следующее
От: Marko Tiikkaja
Дата:
Сообщение: Re: Assertions in PL/PgSQL