Re: log level of "drop cascade" lists - Mailing list pgsql-general

From Willy-Bas Loos
Subject Re: log level of "drop cascade" lists
Date
Msg-id CAHnozTj+sVHa3h35WnDfmMaqkSjviJ3dHXAOLygpauvS2Zj+wQ@mail.gmail.com
Whole thread Raw
In response to Re: log level of "drop cascade" lists  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general

On Thu, Jan 10, 2019 at 4:44 PM Adrian Klaver <adrian.klaver@aklaver.com> wrote:

1) BEGIN;
DROP schema myschema CASCADE;
ROLLBACK/COMMIT;

2) \d myschema.*

On Thu, Jan 10, 2019 at 5:04 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
I think that would be met with more complaints than kudos.
"WARNING" is supposed to mean "there's probably something wrong here",
and a report of a cascaded drop is not that.

OK, both are good points.
Since the list is truncated and possibly affects objects in other schemas, I would recommend setting
SET log_min_messages = notice; 
for that session (for anyone else reading this, no need to set it in the settings file, the above is an sql command).
And then it is possible to view the full list in the log (e.g. after rolling back the transaction with the drop query).

Cheers,
--
Willy-Bas Loos

pgsql-general by date:

Previous
From: Tony Shelver
Date:
Subject: Re: Benchmark of using JSON to transport query results in node.js
Next
From: Alexander Farber
Date:
Subject: How to always run UPDATE FROM despite missing records in the source table?