Turning off Context Message Display on PostgreSQL Drop Table

If you’re working away in a PostgreSQL client query window, sometimes you don’t want to see certain messages. ¬†One of those is the context message that tells you that a table you dropped did not exist. Here’s what that looks like in the Message tab below.

There’s a VERBOSITY environment variable which can be set in psql, but in most client GUI’s that’s not an option. So it comes down to the logic of what triggers the context message. In our case we can avoid the message by seeing if the table exists in information_schema.tables.

There. All quiet now.