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: | Pine.LNX.4.58.0404181937390.2095@mordor.coelho.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
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?
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(at)cri(dot)ensmp(dot)fr
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-04-19 01:59:42 | Re: Basic subtransaction facility |
Previous Message | Bruce Momjian | 2004-04-18 17:51:21 | Re: Basic subtransaction facility |