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

Commita0fa26b

Browse files
committed
Update developers faq in main tree.
1 parentbb50fb5 commita0fa26b

File tree

1 file changed

+47
-8
lines changed

1 file changed

+47
-8
lines changed

‎doc/FAQ_DEV

Lines changed: 47 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
Developer's Frequently Asked Questions (FAQ) for PostgreSQL
33

4-
Last updated:Sat Jul 10 00:38:09 EDT 1999
4+
Last updated:Tue Dec 21 12:30:20 EST 1999
55

6-
Current maintainer: Bruce Momjian (maillist@candle.pha.pa.us)
6+
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
77

88
The most recent version of this document can be viewed at the
99
postgreSQL Web site, http://PostgreSQL.org.
@@ -48,6 +48,8 @@ s
4848
make_mkid make mkid ID files
4949
mkldexport create AIX exports file
5050
pgindent indents C source files
51+
pginclude scripts for adding/removing include files
52+
unused_oids in pgsql/src/include/catalog
5153

5254
Let me note some of these. If you point your browser at the
5355
file:/usr/local/src/pgsql/src/tools/backend/index.html directory, you
@@ -74,15 +76,51 @@ s
7476
make_diff has tools to create patch diff files that can be applied to
7577
the distribution.
7678

77-
pgindent will format source files to match our standard format, which
78-
has four-space tabs, and an indenting format specified by flags to the
79-
your operating system's utility indent.
79+
Our standard format is to indent each code level with one tab, where
80+
each tab is four spaces. You will need to set your editor to display
81+
tabs as four spaces:
82+
vi in ~/.exrc:
83+
set tabstop=4
84+
set sw=4
85+
more:
86+
more -x4
87+
less:
88+
less -x4
89+
emacs:
90+
M-x set-variable tab-width
91+
or
92+
; Cmd to set tab stops &etc for working with PostgreSQL code
93+
(defun pgsql-mode ()
94+
"Set PostgreSQL C indenting conventions in current buffer."
95+
(interactive)
96+
(c-mode) ; necessary to make c-set
97+
-offset local!
98+
(setq tab-width 4) ; already buffer-local
99+
; (setq comment-column 48) ; already buffer-local
100+
(c-set-style "bsd")
101+
(c-set-offset 'case-label '+)
102+
)
103+
or
104+
/*
105+
* Local variables:
106+
* tab-width: 4
107+
* c-indent-level: 4
108+
* c-basic-offset: 4
109+
* End:
110+
*/
111+
112+
pgindent will the format code by specifying flags to your operating
113+
system's utility indent.
80114

81115
pgindent is run on all source files just before each beta test period.
82116
It auto-formats all source files to make them consistent. Comment
83117
blocks that need specific line breaks should be formatted as block
84118
comments, where the comment starts as /*------. These comments will
85-
not be reformatted in any way.
119+
not be reformatted in any way. pginclude contains scripts used to add
120+
needed #include's to include files, and removed unneeded #include's.
121+
When adding system types, you will need to assign oids to them. There
122+
is also a script called unused_oids in pgsql/src/include/catalog that
123+
shows the unused oids.
86124

87125
2) What books are good for developers?
88126

@@ -362,5 +400,6 @@ s
362400

363401
Then, check src/include/port and add your new OS file, with
364402
appropriate values. Hopefully, there is already locking code in
365-
src/include/storage/s_lock.h for your CPU. There is a backend/port
366-
directory if you need special files for your OS.
403+
src/include/storage/s_lock.h for your CPU. There is also a
404+
src/makefiles directory for port-specific Makefile handling. There is
405+
a backend/port directory if you need special files for your OS.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp