Re: [HACKERS] Adding a --quiet option to initdb - Mailing list pgsql-patches

From Devrim GUNDUZ
Subject Re: [HACKERS] Adding a --quiet option to initdb
Date
Msg-id 1138202542.4018.21.camel@evim.gunduz.org
Whole thread Raw
In response to Re: Adding a --quiet option to initdb  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: [HACKERS] Adding a --quiet option to initdb
List pgsql-patches
Hi Andrew,

On Wed, 2006-01-25 at 09:28 -0500, Andrew Dunstan wrote:
> What's wrong with just sending stdout to /dev/null? If that eats error
> messages too then we should probably fix initdb to send those to
> stderr.

We have the same options with reindexdb, for example. I think a command
line option

> But if we are going to do this, then I also noticed a couple of
> things:
>
> . you should explicitly initialize the quiet variable, in keeping with
> the style of the others nearby.

Oh, I've missed it. Patch updated.

> . the idiom
>
>    if (! quiet)
>    {
>       fputs(_("some message"),stdout);
>       fflush(stdout);
>    }
>
> should not be endlessly repeated. Make it a macro or a function.

I'm looking at it now.

Thanks for your comments. I'll provide a new patch soon, which will also
include Alvaro's suggestion about surpression both header and footer
(--make-initdb-really-quiet-mode :) )

Regards,
--
The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/



pgsql-patches by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Adding a --quiet option to initdb
Next
From: Devrim GUNDUZ
Date:
Subject: Re: [HACKERS] Adding a --quiet option to initdb