|
1 | 1 |
|
2 | 2 | Developer's Frequently Asked Questions (FAQ) for PostgreSQL
|
3 | 3 |
|
4 |
| - Last updated: Sat Jul 10 00:38:09 EDT 1999 |
| 4 | + Last updated: Tue Dec 21 12:30:20 EST 1999 |
5 | 5 |
|
6 |
| - Current maintainer: Bruce Momjian (maillist@candle.pha.pa.us) |
| 6 | + Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us) |
7 | 7 |
|
8 | 8 | The most recent version of this document can be viewed at the
|
9 | 9 | postgreSQL Web site, http://PostgreSQL.org.
|
|
48 | 48 | make_mkid make mkid ID files
|
49 | 49 | mkldexport create AIX exports file
|
50 | 50 | pgindent indents C source files
|
| 51 | + pginclude scripts for adding/removing include files |
| 52 | + unused_oids in pgsql/src/include/catalog |
51 | 53 |
|
52 | 54 | Let me note some of these. If you point your browser at the
|
53 | 55 | file:/usr/local/src/pgsql/src/tools/backend/index.html directory, you
|
|
74 | 76 | make_diff has tools to create patch diff files that can be applied to
|
75 | 77 | the distribution.
|
76 | 78 |
|
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. |
80 | 114 |
|
81 | 115 | pgindent is run on all source files just before each beta test period.
|
82 | 116 | It auto-formats all source files to make them consistent. Comment
|
83 | 117 | blocks that need specific line breaks should be formatted as block
|
84 | 118 | 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. |
86 | 124 |
|
87 | 125 | 2) What books are good for developers?
|
88 | 126 |
|
|
362 | 400 |
|
363 | 401 | Then, check src/include/port and add your new OS file, with
|
364 | 402 | 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