Re: How to debug pl/pgSQL -script?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: How to debug pl/pgSQL -script?
Дата
Msg-id 20041001132830.GA5175@dcc.uchile.cl
обсуждение исходный текст
Ответ на How to debug pl/pgSQL -script?  ("Henriksen, Jonas F" <jonas.f.henriksen@imr.no>)
Список pgsql-general
On Fri, Oct 01, 2004 at 03:05:14PM +0200, Henriksen, Jonas F wrote:

> I'm writing some simple triggers and functions for a postgres
> database, and I'm wondering how to go about to debug a
> pl/pgSQL-script. Is there a way to echo variable-content to screen, or
> to file? Or is there other, more advanced ways of debugging such
> scripts?

Yes, use RAISE NOTICE.  See the docs -- it takes a string which can have
% in them, like printf %-escapes but without the modifiers.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Postgres is bloatware by design: it was built to house
PhD theses." (Joey Hellerstein, SIGMOD annual conference 2002)


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

Предыдущее
От: ra@konvergencia.hu
Дата:
Сообщение: Re: How to debug pl/pgSQL -script?
Следующее
От: Kevin Barnard
Дата:
Сообщение: Re: newby question