From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | Les <nagylzs(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: pgsql --echo-errors --quiet and setval |
Date: | 2023-09-10 17:43:25 |
Message-ID: | 2400457.1694367805@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Fri, Sep 8, 2023 at 1:41 PM Les <nagylzs(at)gmail(dot)com> wrote:
>> Today I caught this with postgresql v15, while restoring a database with
>> psql --echo-errors --quiet. (The dump was made using pg_dump -Fp).
>> It logged lots of these messages:
>>
>> setval
>> --------
>> 1001
>> (1 row)
>>
>> In other words, it logs **some** things that are not errors, even though
>> --quiet was specified. Is this the expected behaviour? I would argue that
>> with --quiet --echo-errors, only errors should be logged, and setting the
>> value of a sequence is not an error.
> The output of SELECT queries cannot be quieted, only redirected.
Yeah. You could do "\o /dev/null" or the equivalent to discard the
SELECT results, since a pg_dump script isn't going to be doing anything
that you really need to see the results of.
I'm not sure whether it'd be profitable to try to build that behavior
into the scripts themselves. One problem is that "/dev/null" doesn't
have that name on Windows, so it's hard to see how to invoke the behavior
in a platform-agnostic fashion.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2023-09-10 17:50:29 | Re: pgsql --echo-errors --quiet and setval |
Previous Message | Alban Hertroys | 2023-09-09 09:33:57 | Re: Even if I have a lot of free space PgSQL returns "ERROR: could not extend file - No space left on device" |