* postgresql * 20030828 postgresql is a database server which can be used in conjunction with perl, python, php, apache, etc. postgresql packages include postgresql, postgresql-client, postgresql-doc, libpgsql2, and phhp4-pgsql. postgresql config files are located in /etc/postgresql/. The default configuration should be fine. To allow remote access to databases, you need to set the tcpip_socket option in postgresql.conf. The default port is 5432. The process associated with the postgresql server is postmaster which runs as user postgres. It is restarted with '/etc/init.d/postgresql restart'. Databases are stored in /var/lib/postgres/data/base/. Maintenance consists of regular (nightly) backups and vacuuming with pg_dumpall and vacuumdb. The postgres server logs to /var/log/daemon.log. To use postgresql with php, the following line needs to be added to /etc/php4/apache/php.ini: extension=pgsql.so Additionally, the options pgsql.allow_persistent, pgsql.max_persistent, and pgsql.max_links may be modified. The command line interface to postgres is invoked with 'psql'. By default the only user is user postgres. To add other users, su to posgres and run 'createuser'. createdb is used to create databases, and grant is used to set permissions. See the man pages for more details. This isn't really the place for explaining SQL syntax, but here's a very inadequate quickstart: CREATE TABLE tablename ( foo INTEGER, bar VARCHAR(64), baz BOOLEAN); ALTER TABLE tablename ADD CONSTRAINT foo UNIQUE; GRANT SELECT,INSERT,UPDATE ON tablename TO "www-data"; INSERT INTO tablename (foo, bar, baz) VALUES ('1', 'something', 'true'); SELECT * FROM tablename; SELECT foo,bar FROM tablename WHERE baz = 'true' ORDER BY foo; UPDATE tablename SET foo = '42' WHERE bar ~* 'hitchhikers'; DELETE FROM tablename WHERE foo = '23'; For more information, see the documentation on http://www.postgresql.org.