Alvaro Herrera wrote:
People [are] complaining here that we don't teach people here anyway, so
hopefully my comments were still useful :-)
Yes they are useful. As a new patcher, where should I look for coding standards? How about a little FAQ at the
top of the CVS source tree?

Though, darn it, I sure like //

And my vi is set to:
 set sw=4
 set ts=4
 set expandtab
Because my corporate projects require spaces not tabs.

Some random comments:

* Don't use C++ style comments (//).  Some compilers don't like these.

* Beware of brace position: we use braces on their own, indented at the
  start of a new line, so

!       while(--count) {
! lines++; ! lines->ptr = NULL;
!               lines->width = 0;
!         }


!       while(--count)
!       {
! lines++; ! lines->ptr = NULL;
!               lines->width = 0;
!         }

(with correct indentation anyway)

* Always use tabs, not spaces, to indent.  Tabs are 4 spaces wide.

* Don't use double stars in comments.

* "} else" is forbidden too.  Use two separate lines.

Sent via pgsql-patches mailing list (
To make changes to your subscription:

Reply via email to