Re: newbie debugging pl/pgsql : better way?

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: newbie debugging pl/pgsql : better way?
Дата
Msg-id
27508.972456512@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
newbie debugging pl/pgsql : better way? Frank Miles <fpm@u.washington.edu>
Re: newbie debugging pl/pgsql : better way? Ashley Clark <aclark@ghoti.org>
Re: newbie debugging pl/pgsql : better way? Tom Lane <tgl@sss.pgh.pa.us>
Ashley Clark  writes:
>> Is there a better way to debug pl/pgsql functions?

> If you find it let me know.

The postmaster log should have useful tidbits.  Make sure there *is*
a postmaster log --- start the postmaster without -S, and with its
stdout and stderr directed into a logfile in some handy place.

Then run the misbehaving application with debug options set to -d2
or higher, eg
	export PGOPTIONS="-d2"
	psql mydb
	mydb> -- do your worst here

The log will show the primitive SQL queries generated by plpgsql
functions, as well as the error messages from them.  This is usually
a large leg up on figuring out the problem.  If you're still stuck,
post the plpgsql function body and the relevant logfile section on
the pgsql mail lists, and someone will probably be able to help.

			regards, tom lane
В списке pgsql-general по дате отправления
От: Tom Lane
Дата:
От: Peter Keller
Дата:
FAQ