how to prevent log output from PostgreSQL stored procedure ?

Posted by ssc on Server Fault See other posts from Server Fault or by ssc
Published on 2011-01-13T03:43:30Z Indexed on 2011/01/13 3:55 UTC
Read the original article Hit count: 275

I am running a number of PostgreSQL scripts that used to produce excessive log output. I managed to reduce most of the output to an acceptable amount by passing --quiet as parameter to the psql command line client and adding SET client_min_messages='warning'; to the beginning of my SQL scripts.

This works fine for most basic statements like SELECT, INSERT, UPDATE, etc.) However, when I call a stored function in a script using e.g. SELECT my_func(my_args);, there is still log output similar to

my_func

(omitted a long with many '-' here because SF thinks that's a headline)

(1 row)

The output is useless; it only makes me having to scroll back up a long way after the script has run and also makes it much harder than necessary to spot any relevant error output.

How can I get rid of it ?

© Server Fault or respective owner

Related posts about configuration

Related posts about logging