Forum OpenACS Q&A: Response to What does it take to get Postgresql database error detail in tracebacks?

You get the same error messages in psql as you do in the aolserver log file.  Once you isolate a problem to a particular pl/pgsql function, then the best thing to do is start putting raise notice calls in the function to output debug data.  It also works well to comment out parts of a pl/pgsql function until the error message goes away - kind of a divide and conquer approach.