Re: guc variables flags explicitly initialisation - Mailing list pgsql-patches

From Fabien COELHO
Subject Re: guc variables flags explicitly initialisation
Date
Msg-id Pine.LNX.4.58.0404181937390.2095@mordor.coelho.net
Whole thread Raw
In response to Re: guc variables flags explicitly initialisation  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Dear Tom,

> > please find attached a large but simple patch that insures that all guc
> > variables flags are explicitly set, instead of relying on the default
> > behavior of static variable area to be filled with zeros.
>
> This seems entirely pointless.  Why should we add a large amount of
> noise to these table definitions to avoid relying on standard C behavior?

Sure.

As I wrote in the mail, I had a bug in another development I suspected it
could be the source of the problem, hence I tried to fix it that way. Once
it was written, and after I found my stupid bug elsewhere, I felt that I
could sent it anyway.

It is a personnal stylistic taste that I don't like too much of implicit
things in code, such as relying of default initialisation of static
variables, as the same behavior cannot be expected for heap and stack
variables. Also, I don't like a not written 0 to have an implicit
semantics everywhere. Moreover such implicit things do not help me
understand the source code when I need to.

If you want to reduce what you call noise, you can drop NULL everywhere
at the end of the struct as they are as 'pointless'. I wouldn't do it.

Anyway, if you don't like it, you reject it and it is fine with me.

BTW, maybe you could either accept/discuss/reject some other 'small'
patches I submitted earlier, if you have some time. They are not cosmetic
as this one.

Have a nice day,

--
Fabien Coelho - coelho@cri.ensmp.fr

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Basic subtransaction facility
Next
From: Bruce Momjian
Date:
Subject: Re: Basic subtransaction facility