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

Re: guc variables flags explicitly initialisation

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: guc variables flags explicitly initialisation
Date: 2004-04-18 17:55:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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?


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(at)cri(dot)ensmp(dot)fr

In response to

pgsql-patches by date

Next:From: Bruce MomjianDate: 2004-04-19 01:59:42
Subject: Re: Basic subtransaction facility
Previous:From: Bruce MomjianDate: 2004-04-18 17:51:21
Subject: Re: Basic subtransaction facility

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