author | Magnus Hagander | |
Tue, 22 Apr 2008 09:26:32 +0000 (09:26 +0000) | ||
committer | Magnus Hagander | |
Tue, 22 Apr 2008 09:26:32 +0000 (09:26 +0000) |
doc/FAQ_DEV | patch | blob | blame | history | |
doc/src/FAQ/FAQ_DEV.html | patch | blob | blame | history |
Last updated: Tue Nov 13 22:39:08 EST 2007
Current maintainer: Bruce Momjian (
The most recent version of this document can be viewed at
Download the code and have a look around. See
Subscribe to and read the
PostgreSQL is developed mostly in the C programming language. It The source code is targeted at most of the popular Unix Most developers make use of the open source development tool Developers using this tool chain on Windows make use of MingW Some developers use compilers from other software vendors with Developers who regularly rebuild the source often pass the src/Makefile.custom can be used to set environment variables, You can learn more about these features by consulting the Send an email to pgsql-hackers with a proposal for what you want A web site is maintained for patches awaiting review, You will need to submit the patch to [email protected]. It Even if you pass all of the above, the patch might still be You will be notified via email when the patch is applied, and Patch committers check several things before applying a patch: Other than documentation in the source tree itself, you can find There are several ways to obtain the source tree. Occasional Regular developers might want to take advantage of anonymous Basic system testing The easiest way to test your code is to ensure that it builds It is worth advised that you pass --enable-cassert to Then, perform run time testing via psql. Regression test suite The next step is to test your changes against the existing If you've deliberately changed existing behavior, this change Other run time testing Some developers make use of tools such as valgrind (
What about unit testing, static analysis, model There have been a number of discussions about other testing Keep in mind the Makefiles do not have the proper First, all the files in the src/tools directory are In src/include/catalog: Second, you really should have an editor that can handle tags, Third, you need to get id-utils from
By running tools/make_mkid, an archive of source symbols Some developers make use of cscope, which can be found at
tools/make_diff has tools to create patch diff files that Our standard format BSD style, with each level of code indented The tools/editors directory of the latest sources contains sample pgindent will the format code by specifying flags to your pgindent is run on all source files just before each beta pginclude contains scripts used to add needed When adding system types, you will need to assign oids to them. There are five good books: The files configure and configure.in are part of When configure is run by the user, it tests various OS When you need to edit files, make sure you don't waste time There are a variety of places that need to be modified to add a Then, check src/include/port and add your new OS file, There is always a temptation to use the newest operating system First, we support 15+ operating systems, so any new feature has As an example, threads are not currently used in the backend So, we are not ignorant of new features. It is just that we are This was written by Lamar Owen and Devrim Gündüz: 2006-10-16 PGDG RPM Maintainer builds the SRPM and announces the SRPM to the We try to build on as many different canonical distributions as we can. To test the binaries, we install them on our local machines and run Once the build passes these tests, the binary RPMs are sent back to PGDG You will notice we said 'canonical' distributions above. That simply PGDG RPM Building Project does not build RPMs for Mandrake . We usually have only one SRPM for all platforms. This is because of our Please note that this is a volunteered job -- We are doing our best to PGDG RPM Building Project is a hosted on pgFoundry : As to why all these files aren't part of the source tree, well, unless This was written by Tom Lane: 2001-05-07 If you just do basic "cvs checkout", "cvs update", "cvs commit", The first thing you have to know is the branch name for the OK, so how do you do work on a branch? By far the best way is to Normally, to checkout the head branch, you just cd to the place To get a past branch, you cd to wherever you want it and For example, just a couple days ago I did and now I have a maintenance copy of 7.1.*. When you've done a checkout in this way, the branch name is So, if you have a patch that needs to apply to both the head and There are three versions of the SQL standard: SQL-92, SQL:1999, Some SQL standards web pages are: Many technical questions held by those new to the code have been If you cannot find discussion or your particular question, feel Major contributors also answer technical questions, including PostgreSQL website development is discussed on the Currently the core developers see no SCMS that will provide Currently there is no intention for switching to a new SCMS until at least the You first need to find the tuples(rows) you are interested in. The rows returned are cache-owned versions of the heap rows. If you can't use the system cache, you will need to retrieve the Open the table with heap_open(). You can then start a You can also use heap_fetch() to fetch rows by block Once you have the row, you can get data that is common to all Table, column, type, function, and view names are stored in Many functions are called with both types of names, ie. We do this because this allows a consistent way to pass data Here are some of the List manipulation commands: The structures passed around in the parser, rewriter, palloc() and pfree() are used in place of malloc() ereport() is used to send messages to the front-end, and ereport(ERROR) frees most memory and open file Normally, transactions can not see the rows they modify. However, there are cases where a transactions needs to see First, try running configure with the --enable-cassert The postgres server has a -d option that allows If the postmaster is not running, you can actually If the postmaster is running, start psql in You can also compile with profiling to see what functions The developer FAQ can be found on the PostgreSQL wiki:General Questions
Technical Questions
General Questions
1.1) How do I get involved in PostgreSQL
1.2) What development environment is required
1.3) What areas need work?
1.4) What do I do after choosing an item to
1.5) I have developed a patch, what next?
1.6) How is a patch reviewed?
1.7) Where can I learn more about the
1.8) How do I download/update the current
1.9) How do I test my changes?
1.10) What tools are available for
/*------
. These comments will not be reformatted in#include
's to include files, and removed unneeded#include
's.1.11) What books are good for
1.12) What is configure all about?
1.13) How do I add a new port?
1.14) Why don't you use threads, raw
1.15) How are RPMs packaged?
1.16) How are CVS branches managed?
1.17) Where can I get a copy of the SQL
1.18) Where can I get technical
1.19) How do I get involved in PostgreSQL
1.20) Why haven't you replaced CVS with SVN, Git,
Technical Questions
2.1) How do I efficiently access information
((Form_pg_class) GETSTRUCT(tuple))->relnatts
2.2) Why are table, column, type, function,
typedef struct nameData
2.3) Why do we use Node and
(gdb) set print elements 0
(gdb) call print(any_pointer)
2.4) I just added a field to a structure.
2.5) Why do we use palloc() and
2.6) What is ereport()?
2.7) What is CommandCounterIncrement()?
UPDATE foo SET x = x + 1
to work2.8) What debugging features are available?
SELECT pg_backend_pid()
.