1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Backpatch FAQs to 8.1.X.

This commit is contained in:
Bruce Momjian
2006-10-10 00:29:15 +00:00
parent 7cec8b4e4a
commit 61c91fd2d2
12 changed files with 1390 additions and 1211 deletions

View File

@ -1,9 +1,9 @@
Developer's Frequently Asked Questions (FAQ) for PostgreSQL
Last updated: Fri May 5 05:51:42 EDT 2006
Last updated: Wed Sep 6 20:12:13 EDT 2006
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
Current maintainer: Bruce Momjian (bruce@momjian.us)
The most recent version of this document can be viewed at
http://www.postgresql.org/files/documentation/faqs/FAQ_DEV.html.
@ -125,7 +125,7 @@ General Questions
3. The patch should be generated in contextual diff format (diff -c
and should be applicable from the root directory. If you are
unfamiliar with this, you might find the script
src/tools/makediff/difforig useful. (Unified diffs are only
src/tools/make_diff/difforig useful. (Unified diffs are only
preferable if the file changes are single-line changes and do not
rely on surrounding lines.)
4. PostgreSQL is licensed under a BSD license, so any submissions
@ -141,7 +141,7 @@ General Questions
7. New feature patches should also be accompanied by documentation
patches. If you need help checking the SQL standard, see 1.16.
8. If you are adding a new feature, confirm that it has been tested
thoughly. Try to test the feature in all conceivable scenarios.
thoroughly. Try to test the feature in all conceivable scenarios.
9. If it is a performance patch, please provide confirming test
results to show the benefit of your patch. It is OK to post
patches without this information, though the patch will not be
@ -159,7 +159,8 @@ General Questions
Other than documentation in the source tree itself, you can find some
papers/presentations discussing the code at
http://www.postgresql.org/developer.
http://www.postgresql.org/developer. An excellent presentation is at
http://neilconway.org/talks/hacking/
1.7) How do I download/update the current source tree?
@ -276,9 +277,9 @@ General Questions
applied to the distribution. This produces context diffs, which is our
preferred format.
Our standard format is to indent each code level with one tab, where
each tab is four spaces. You will need to set your editor to display
tabs as four spaces:
Our standard format BSD style, with each level of code indented one
tab, where each tab is four spaces. You will need to set your editor
or file viewer to display tabs as four spaces:
vi in ~/.exrc:
set tabstop=4
set sw=4
@ -286,40 +287,11 @@ General Questions
more -x4
less:
less -x4
emacs:
M-x set-variable tab-width
or
(c-add-style "pgsql"
'("bsd"
(indent-tabs-mode . t)
(c-basic-offset . 4)
(tab-width . 4)
(c-offsets-alist .
((case-label . +)))
)
nil ) ; t = set this style, nil = don't
(defun pgsql-c-mode ()
(c-mode)
(c-set-style "pgsql")
)
and add this to your autoload list (modify file path in macro):
(setq auto-mode-alist
(cons '("\\`/home/andrew/pgsql/.*\\.[chyl]\\'" . pgsql-c-mode)
auto-mode-alist))
or
/*
* Local variables:
* tab-width: 4
* c-indent-level: 4
* c-basic-offset: 4
* End:
*/
The tools/editors directory of the latest sources contains sample
settings that can be used with the emacs, xemacs and vim editors, that
assist in keeping to PostgreSQL coding standards.
pgindent will the format code by specifying flags to your operating
system's utility indent. This article describes the value of a
consistent coding style.