PostgreSQL




Common

Web site: http://www.postgresql.org

Create a database

Creating a database:

 <PostgreSQL>/bin/psql -U postgres

 postgres=# create database plazma;
 postgres=# \q
 

Creating a structure of database and populate init data:

 <PostgreSQL>/bin/psql -d plazma -U postgres -f ñ:\Plazma\db\script\createdb\postgresql\en\create_plazma_db.sql 
 




JDBC driver

You have to check the JDBC driver:


 <Plazma>/lib/jdbc/postgresql/postgresql-8.0.309.jdbc3.jar
 

You have to verify CLASSPATH for the JDBC driver in the file:


 <Plazma>/plazma.classpath
 ------------------------------------------------------
 # PostgreSQL 
 lib/jdbc/postgresql/postgresql-8.0.309.jdbc3.jar 

 


Connect to a database

To connect you have to change properties in file <Plazma>/conf/jdbc.properties.

For example:



 # Set connection properties
 jdbc.driverClassName=org.postgresql.Driver
 jdbc.url=jdbc:postgresql://localhost:5432/plazma
 jdbc.username=postgres
 jdbc.password=tiger