|
1 | 1 |
|
2 | 2 | Developer's Frequently Asked Questions (FAQ) for PostgreSQL
|
3 | 3 |
|
4 |
| - Last updated: FriDec 24 11:43:42 EST 1999 |
| 4 | + Last updated: FriJun 9 21:54:54 EDT 2000 |
5 | 5 |
|
6 | 6 | Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
|
7 | 7 |
|
|
69 | 69 | back out twice to return to the original function. Most editors
|
70 | 70 | support this via tags or etags files.
|
71 | 71 |
|
72 |
| - Third, you need to get mkid from ftp.postgresql.org. By running |
73 |
| - tools/make_mkid, an archive of source symbols can be created that can |
74 |
| - be rapidly queried like grep or edited. Others prefer glimpse. |
| 72 | + Third, you need to get id-utils from: |
| 73 | + ftp://alpha.gnu.org/gnu/id-utils-3.2d.tar.gz |
| 74 | + ftp://tug.org/gnu/id-utils-3.2d.tar.gz |
| 75 | + ftp://ftp.enst.fr/pub/gnu/gnits/id-utils-3.2d.tar.gz |
| 76 | + |
| 77 | + By running tools/make_mkid, an archive of source symbols can be |
| 78 | + created that can be rapidly queried like grep or edited. Others prefer |
| 79 | + glimpse. |
75 | 80 |
|
76 | 81 | make_diff has tools to create patch diff files that can be applied to
|
77 | 82 | the distribution.
|
|
90 | 95 | M-x set-variable tab-width
|
91 | 96 | or
|
92 | 97 | ; 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 |
| - ) |
| 98 | + (c-add-style "pgsql" |
| 99 | + '("bsd" |
| 100 | + (indent-tabs-mode . t) |
| 101 | + (c-basic-offset . 4) |
| 102 | + (tab-width . 4) |
| 103 | + (c-offsets-alist . |
| 104 | + ((case-label . +)))) |
| 105 | + t) ; t = set this mode on |
103 | 106 |
|
104 | 107 | and add this to your autoload list (modify file path in macro):
|
105 | 108 |
|
@@ -311,8 +314,8 @@ c-mode)
|
311 | 314 | you to query the system catalogs. This is the preferred way to access
|
312 | 315 | system tables, because the first call to the cache loads the needed
|
313 | 316 | rows, and future requests can return the results without accessing the
|
314 |
| - base table.Some of thecaches use system table indexes to look up |
315 |
| -tuples. Alist of available caches is located in |
| 317 | + base table.Thecaches use system table indexes to look up tuples. A |
| 318 | + list of available caches is located in |
316 | 319 | src/backend/utils/cache/syscache.c.
|
317 | 320 | src/backend/utils/cache/lsyscache.c contains many column-specific
|
318 | 321 | cache lookup functions.
|
@@ -355,11 +358,12 @@ c-mode)
|
355 | 358 | is to use heap_tuplemodify() and pass it your palloc'ed tuple, and the
|
356 | 359 | values you want changed. It returns another palloc'ed tuple, which you
|
357 | 360 | pass to heap_replace(). You can delete tuples by passing the tuple's
|
358 |
| - t_self to heap_destroy(). Remember, tuples can be either system cache |
359 |
| - versions, which may go away soon after you get them, buffer cache |
360 |
| - version, which will go away when you heap_getnext(), heap_endscan, or |
361 |
| - ReleaseBuffer(), in the heap_fetch() case. Or it may be a palloc'ed |
362 |
| - tuple, that you must pfree() when finished. |
| 361 | + t_self to heap_destroy(). You can use it for heap_update() too. |
| 362 | + Remember, tuples can be either system cache versions, which may go |
| 363 | + away soon after you get them, buffer cache versions, which go away |
| 364 | + when you heap_getnext(), heap_endscan, or ReleaseBuffer(), in the |
| 365 | + heap_fetch() case. Or it may be a palloc'ed tuple, that you must |
| 366 | + pfree() when finished. |
363 | 367 |
|
364 | 368 | 10) What is elog()?
|
365 | 369 |
|
|