Re: [REVIEW] prepare plans of embedded sql on function start

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: [REVIEW] prepare plans of embedded sql on function start
Дата
Msg-id CAFj8pRAWwO6K1XTao+qbXUc7RXuB8gAGksmYmyxQMvCcJx1adA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [REVIEW] prepare plans of embedded sql on function start  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Hello

this is initial version of CHECK FUNCTION | CHECK TRIGGER statement

usage is simple


postgres=# CHECK FUNCTION f();
CHECK FUNCTION
Time: 3,411 ms
postgres=# CHECK TRIGGER foo ON omega ;
NOTICE:  checking function "trg()"
CHECK TRIGGER
Time: 73,139 ms
postgres=# select plpgsql_checker('f()'::regprocedure, 0);
 plpgsql_checker
─────────────────

(1 row)

Time: 0,861 ms

second parameter of plpgsql_checker function is relation oid that is
used for trigger checking. A possibility batch checking is reason why
I used new PL function.

when function has a bug, then CHECK FUNCTION show it


postgres=# CHECK FUNCTION fx();
ERROR:  column "z" does not exist
LINE 1: SELECT exists(select * from omega where z = 1)
                                                ^
QUERY:  SELECT exists(select * from omega where z = 1)
CONTEXT:  PL/pgSQL function "fx" line 4 at IF
postgres=#

autocomplete in psql is supported

Regards

Pavel Stehule

Вложения

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Displaying accumulated autovacuum cost
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: Double sorting split patch