If you want to try the examples in this chapter, you'll probably need to install a few extra pieces of software. You will obviously need Python and PostgreSQL. You'll also need the PyGreSQL interface.

If you are installing PostgreSQL from RPMs, you will find the PyGreSQL interface in the postgresql-python RPM.

If you are building PostgreSQL from a source distribution, you must include the --with-python flag when you run configure. When you run make install, the following files will be installed[1]:

[1] The exact pathnames will depend on your configuration, but the filenames should be the same.




If you intend to use the Python-DB API (which I would recommend), you will also need the mx extensions package from Egenix (

Some of the examples in this chapter make use of the Tkinter GUI toolkit (more on that later). Tkinter is usually distributed with Python, but you will also need the Tktable module. You can find at our web site:

    Part II: Programming with PostgreSQL