Akshay Hazari
Akshay Hazari

Reputation: 3267

Setting Verbosity to Verbose in psycopg2

How do I set the setting value VERBOSE in psycopg2

This is the equivalent command in postgreSQL

\set VERBOSITY verbose

Upvotes: 0

Views: 1356

Answers (1)

Shmuel Kamensky
Shmuel Kamensky

Reputation: 598

According to the postgres psql documentation VERBOSITY is used to

control the verbosity of error reports.

Given that the name similarity and the fact that they take the same parameters I'm assuming the runtime config equivalent is log_error_verbosity whose documentation can be found in runtime config logging.

That being set you can use psycopg2 to execute the following SQL.

set log_error_verbosity ='default';

or

set log_error_verbosity ='verbose';

or

set log_error_verbosity ='terse';

And then to view the setting again use:

show log_error_verbosity;

Keep in mind that since this is a runtime config change the verbosity will only be changed during the session and will be reset to the default configuration upon session restart.

Upvotes: 1

Related Questions