Re: plpgsql debugging

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: plpgsql debugging
Дата
Msg-id 200309081653.53784.dev@archonet.com
обсуждение исходный текст
Ответ на plpgsql debugging  (Andreas Pflug <pgadmin@pse-consulting.de>)
Ответы Re: plpgsql debugging  (Andreas Pflug <pgadmin@pse-consulting.de>)
Список pgsql-hackers
On Monday 08 September 2003 15:14, Andreas Pflug wrote:
>
> Looking at the code, I think that a validator could be added quite soon.
> The PLpgSQL_execstate struct could be extended by a validation_active
> bool flag, which changes the behaviour of all exec_stmt_XXX routines.
> The validator primarily executes the function, with that flag to TRUE,
> forcing all conditional statements to execute all execution paths
> exactly once, and sql statements being parsed.

Sounds good.

> Debugging is much harder.
>
> There are two levels of debugging thinkable: full-blown stepping with
> breakpoints etc while running in the backend, and the small version
> having an intelligent console which simulates a backend understanding
> plpgsql language natively, so you can test the code by executing single
> blocks of code one after another (i.e not storing the function, but
> selectively executing parts of the function definition).

Actually, a simple trace ability would be a huge step forward. It'd save me 
dotting RAISE statements around my functions while I write them. Even the 
ability to add DEBUG statements that checked some global flag before firing 
would be very useful (to me at least).

--  Richard Huxton Archonet Ltd


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: plpgsql doesn't coerce boolean expressions to boolean
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: plpgsql doesn't coerce boolean expressions to boolean