Next: , Up: PostgreSQL Support   [Contents][Index]


61.1 Building SXEmacs with PostgreSQL support

SXEmacs PostgreSQL support requires linking to the PostgreSQL libpq library. We have copied the short version of how to build and setup PostgreSQL here:

./configure
gmake
su
gmake install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 &

With this installation you can try to create a database ‘test’:

/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test

If you are building SXEmacs from source, you need to install PostgreSQL first (see above example). On some systems, PostgreSQL will come pre-installed in /usr or /usr/local. In this case, it should be autodetected when you run configure.

If PostgreSQL is installed into its default location (for example when passing no ‘--prefix’ to the configure; /usr/local/pgsql is default) you must specify --site-prefixes=/usr/local/pgsql when you run configure. If PostgreSQL is installed into another location, use that instead of /usr/local/pgsql when specifying --site-prefixes.

All versions of SXEmacs have been reported to work with PostgreSQL versions 6.5, 7.x, and 8.x. SXEmacs Lisp support for V7.x and V8.x is somewhat more extensive than support for V6.5. In particular, asynchronous queries are supported.