File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1- <!-- $PostgreSQL: pgsql/doc/src/sgml/sources.sgml,v 2.36 2010/06/28 17:48:26 petere Exp $ -->
1+ <!-- $PostgreSQL: pgsql/doc/src/sgml/sources.sgml,v 2.37 2010/07/10 18:37:00 tgl Exp $ -->
22
33 <chapter id="source">
44 <title>PostgreSQL Coding Conventions</title>
1818 <literal>while</>, <literal>switch</>, etc go on their own lines.
1919 </para>
2020
21+ <para>
22+ Limit line lengths so that the code is readable in an 80-column window.
23+ (This doesn't mean that you must never go past 80 columns. For instance,
24+ breaking a long error message string in arbitrary places just to keep the
25+ code within 80 columns is probably not a net gain in readability.)
26+ </para>
27+
2128 <para>
2229 Do not use C++ style comments (<literal>//</> comments). Strict ANSI C
2330 compilers do not accept them. For the same reason, do not use C++
5057 rules, it's a good idea to do so. Your code will get run through
5158 <application>pgindent</> before the next release, so there's no point in
5259 making it look nice under some other set of formatting conventions.
60+ A good rule of thumb for patches is <quote>make the new code look like
61+ the existing code around it</>.
5362 </para>
5463
5564 <para>
You can’t perform that action at this time.
0 commit comments