How to suppress INFO messages when running psql scripts

I see INFO messages when I run my tests, and I thought I got rid of them by setting client_min_messages PGOPTION. Here is my command:

PGOPTIONS='--client-min-messages=warning' \ psql -h localhost \ -p 5432 \ -d my_db \ -U my_user \ --no-align \ --field-separator '|' \ --pset footer \ --quiet \ -v AUTOCOMMIT=off \ -X \ -v VERBOSITY=terse \ -v ON_ERROR_STOP=1 \ --pset pager=off \ -f tests/test.sql \ -o "$test_results" 

Can someone advise me how to disable INFO messages?

+4
source share
1 answer

This works for me (PostgreSQL 9.1.4 on Debian GNU Linux):

 env PGOPTIONS='-c client_min_messages=WARNING' psql ... 

I do this according to the guide about Settings .

Note that for client_min_messages there is no INFO message level.
This only applies to log_min_messages and log_min_error_statement .

+4
source

All Articles