Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4720ad5

Browse files
committed
Add a note about preferred window width to the section about code
formatting conventions.
1 parent2e6d24a commit4720ad5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

‎doc/src/sgml/sources.sgml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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>
@@ -18,6 +18,13 @@
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++
@@ -50,6 +57,8 @@
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>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp