Skip site navigation (1) Skip section navigation (2)

Re: [PATCHES] Adding a --quiet option to initdb

From: Devrim GUNDUZ <devrim(at)commandprompt(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] Adding a --quiet option to initdb
Date: 2006-01-25 15:22:22
Message-ID: 1138202542.4018.21.camel@evim.gunduz.org (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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/



In response to

Responses

pgsql-hackers by date

Next:From: Devrim GUNDUZDate: 2006-01-25 15:26:53
Subject: Re: [PATCHES] Adding a --quiet option to initdb
Previous:From: Alvaro HerreraDate: 2006-01-25 14:29:10
Subject: Re: Suggestions for post-mortem...

pgsql-patches by date

Next:From: Devrim GUNDUZDate: 2006-01-25 15:26:53
Subject: Re: [PATCHES] Adding a --quiet option to initdb
Previous:From: Andrew DunstanDate: 2006-01-25 14:28:04
Subject: Re: [PATCHES] Adding a --quiet option to initdb

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group