Database Reference
In-Depth Information
Additional resources for C
In this chapter, we were able to only give you a very basic introduction to what is pos-
sible in C. Here is some advice on how to get more information.
First, there is of course the chapter C-Language Functions in the PostgreSQL manu-
al. This can be found online at http://www.postgresql.org/docs/current/static/xfunc-
c.html and as with most of the online PostgreSQL manual, you usually can get to older
versions if they exist.
The next one, not surprisingly, is the PostgreSQL source code itself. However, you
will usually not get very far by just opening the files or using grep to find what you
need. If you are good with using ctags ( http://en.wikipedia.org/wiki/Ctags ) or other
similar tool, it is definitely recommended.
Also, if you are new to these types of large-code exploration systems, then a really
good resource for finding and examining PostgreSQL internals is maintained at ht-
tp://doxygen.postgresql.org/ . This points to the latest git master so it may not be
accurate for your version of PostgreSQL, but it is usually good enough and at least
provides a nice starting point for digging around in the source code of your version.
Quite often, you will find something to base (parts of) your C source on in the con-
trib/ directory in the source code. To get an idea what is there, read through the Ap-
pendix F , Additional Supplied Modules ( http://www.postgresql.org/docs/current/static/
contrib.html ) . It may even be that somebody has already written what you need. There
are even more modules in http://pgfoundry.org for you to examine and choose. A word
of warning though, while modules in contrib/ is checked at least by one or two
competent PostgreSQL core programmers, the things at pgfoundry can be of wildly
varying quality. The top active projects are really good however, so the main things to
look at when determining if you can use them as learning source are how active the
project is and when it was last updated.
There is also a set of GUC parameters specifically for development and debugging
which are usually left out of sample postgresql.conf file. The descriptions and
some explanation is available at http://www.postgresql.org/docs/current/static/
runtime-config-developer.html .
Search WWH ::




Custom Search