disable NOTICES in psql output

前端 未结 5 731
醉话见心
醉话见心 2020-12-23 13:26

How do I stop psql (PostgreSQL client) from outputting notices? e.g.

psql:schema/auth.sql:20: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit

5条回答
  •  我在风中等你
    2020-12-23 14:00

    Probably the most comprehensive explanation is on Peter Eisentrauts blog entry here

    I would strongly encourage that the original blog be studied and digested but the final recommendation is something like :

    PGOPTIONS='--client-min-messages=warning' psql -X -q -a -1 -v ON_ERROR_STOP=1 --pset pager=off -d mydb -f script.sql
    

提交回复
热议问题