On Sat, 2007-03-03 at 15:04 -0300, Alvaro Herrera wrote:
> I think this is the reason why struct members are prefixed with some
> short form of the struct name; for example struct timeval has tv_sec and
> tv_usec.  This is used in a lot of places in our code.  Maybe it would
> be a good idea to make it a coding guideline.  For example, I'd rename
> StringInfo members as si_len, si_buf, si_data, which would make this job
> quite a lot easier.

I'm not opposed to this idea in general, but I didn't bother doing it
for StringInfo as part of this patch. Besides it being more work :), I
also wonder if it's a net win to make the change for structs that are
directly accessed by code that lives outside the PG tree (e.g.

As for making it a coding guideline, I think it would be a good idea to
codify some of the more common rules and idioms in the Postgres source
tree. Most of these sorts of issues are flagged during code review, but
it might save some time in the long run to enumerate some code style
suggestions on the wiki or somewhere similar.


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not

Reply via email to