PostgreSQL
m |
m (categorized) |
||
Line 50: | Line 50: | ||
==PostgreSQL Website== | ==PostgreSQL Website== | ||
[http://www.postgresql.org http://www.postgresql.org] | [http://www.postgresql.org http://www.postgresql.org] | ||
+ | |||
+ | [[Category : Ports and Packages]] |
Revision as of 01:17, 18 July 2005
PostgreSQL is an open source object-relationnal database management system released under the terms of the BSD licence. It is based on postgres, developped at the University of California at Berkeley Computer Science Department (Juste like BSD). It features many stuff MySQL lacks, such as transactional integrity or complex queries.
Contents |
Installation
You can choose to install PostgreSQL from the port tree...
/usr/ports/databases/postgresql80-client /usr/ports/databases/postgresql80-server
... or the packages ...
pkg_add -r postgresql80-client postgresql80-server
Additionnaly, you may want to install postgresql support to PHP. Depending on your PHP version, install :
/usr/ports/databases/php4-pgsql # or /usr/ports/databases/php5-pgsql
(You can also install it from packages)
Configuring PostgreSQL
Creating a cluster
What is called cluster in PostgreSQL is the database disk area. The first step is to enable PostgreSQL, witch is done in /etc/rc.conf : add the following line at the end :
postgresql_enable="YES"
Then, run :
/usr/local/etc/rc.d/010.pgsql.sh initdb
If everything is good, you can now start PostgreSQL :
/usr/local/etc/rc.d/010.pgsql.sh start
Creating databases
There are two ways to create databases :
- The createdb command (in a shell).
- The CREATE DATABASE query.
I will explain this latter .... --Smortex 02:16, 18 Jul 2005 (EDT)
Creating users
There are two ways to create users :
- The createuser command (in a shell).
- The CREATE USER query.
I will explain this latter .... --Smortex 02:16, 18 Jul 2005 (EDT)