1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-17 06:41:09 +03:00

update developers faq

This commit is contained in:
Bruce Momjian
2000-06-10 02:05:55 +00:00
parent d9bb8e7590
commit cb9221a820

View File

@ -1,7 +1,7 @@
Developer's Frequently Asked Questions (FAQ) for PostgreSQL Developer's Frequently Asked Questions (FAQ) for PostgreSQL
Last updated: Fri Dec 24 11:43:42 EST 1999 Last updated: Fri Jun 9 21:54:54 EDT 2000
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us) Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
@ -69,9 +69,14 @@ s
back out twice to return to the original function. Most editors back out twice to return to the original function. Most editors
support this via tags or etags files. support this via tags or etags files.
Third, you need to get mkid from ftp.postgresql.org. By running Third, you need to get id-utils from:
tools/make_mkid, an archive of source symbols can be created that can ftp://alpha.gnu.org/gnu/id-utils-3.2d.tar.gz
be rapidly queried like grep or edited. Others prefer glimpse. ftp://tug.org/gnu/id-utils-3.2d.tar.gz
ftp://ftp.enst.fr/pub/gnu/gnits/id-utils-3.2d.tar.gz
By running tools/make_mkid, an archive of source symbols can be
created that can be rapidly queried like grep or edited. Others prefer
glimpse.
make_diff has tools to create patch diff files that can be applied to make_diff has tools to create patch diff files that can be applied to
the distribution. the distribution.
@ -90,16 +95,14 @@ s
M-x set-variable tab-width M-x set-variable tab-width
or or
; Cmd to set tab stops &etc for working with PostgreSQL code ; Cmd to set tab stops &etc for working with PostgreSQL code
(defun pgsql-mode () (c-add-style "pgsql"
"Set PostgreSQL C indenting conventions in current buffer." '("bsd"
(interactive) (indent-tabs-mode . t)
(c-mode) ; necessary to make c-set (c-basic-offset . 4)
-offset local! (tab-width . 4)
(setq tab-width 4) ; already buffer-local (c-offsets-alist .
; (setq comment-column 48) ; already buffer-local ((case-label . +))))
(c-set-style "bsd") t) ; t = set this mode on
(c-set-offset 'case-label '+)
)
and add this to your autoload list (modify file path in macro): and add this to your autoload list (modify file path in macro):
@ -311,8 +314,8 @@ c-mode)
you to query the system catalogs. This is the preferred way to access you to query the system catalogs. This is the preferred way to access
system tables, because the first call to the cache loads the needed system tables, because the first call to the cache loads the needed
rows, and future requests can return the results without accessing the rows, and future requests can return the results without accessing the
base table. Some of the caches use system table indexes to look up base table. The caches use system table indexes to look up tuples. A
tuples. A list of available caches is located in list of available caches is located in
src/backend/utils/cache/syscache.c. src/backend/utils/cache/syscache.c.
src/backend/utils/cache/lsyscache.c contains many column-specific src/backend/utils/cache/lsyscache.c contains many column-specific
cache lookup functions. cache lookup functions.
@ -355,11 +358,12 @@ c-mode)
is to use heap_tuplemodify() and pass it your palloc'ed tuple, and the is to use heap_tuplemodify() and pass it your palloc'ed tuple, and the
values you want changed. It returns another palloc'ed tuple, which you values you want changed. It returns another palloc'ed tuple, which you
pass to heap_replace(). You can delete tuples by passing the tuple's pass to heap_replace(). You can delete tuples by passing the tuple's
t_self to heap_destroy(). Remember, tuples can be either system cache t_self to heap_destroy(). You can use it for heap_update() too.
versions, which may go away soon after you get them, buffer cache Remember, tuples can be either system cache versions, which may go
version, which will go away when you heap_getnext(), heap_endscan, or away soon after you get them, buffer cache versions, which go away
ReleaseBuffer(), in the heap_fetch() case. Or it may be a palloc'ed when you heap_getnext(), heap_endscan, or ReleaseBuffer(), in the
tuple, that you must pfree() when finished. heap_fetch() case. Or it may be a palloc'ed tuple, that you must
pfree() when finished.
10) What is elog()? 10) What is elog()?