ToDo: plpgsql plugin for query and expression verification

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема ToDo: plpgsql plugin for query and expression verification
Дата
Msg-id 162867791002160005q44d5362eo2db235a83736fa96@mail.gmail.com
обсуждение исходный текст
Ответы Re: ToDo: plpgsql plugin for query and expression verification  (Hitoshi Harada <umi.tanuki@gmail.com>)
Список pgsql-hackers
Hello

I thinking about more restrictive query and expression checking than
now. Used parser checking isn't enough - so some possible bugs can be
detected in production stage. Other problem is  using any expression
as SELECT expr.  The request on validation can be different and it is
probably for more advanced users - so it could be wrapped to some
plugin. So users can exactly set an level for checking that is the
best for they.

postgres=# set check_function_bodies to on;SET
postgres=#
create or replace function foo(a varchar, b varchar)
returns varchar as $$
begin a = current_date; -- result type is different then target type return a || b || c;    -- simple expression has
unknownsymbol
 
end;
$$ language plpgsql;
CREATE FUNCTION

I think, so these problem have to be identified in compile stage - but
it can be too strict for all (and can slow down production) - it is
reason for plugin.

What do you think about this idea?

Regards
Pavel Stehule


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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: psycopg2 license changed
Следующее
От: Boszormenyi Zoltan
Дата:
Сообщение: Re: [GENERAL] libecpg versions and libecpg_compat