Notes about PostgreSQL

From OpenPetra Wiki
Jump to navigation Jump to search

installation

Windows

  • don't install as a service
initdb
"postgres" -D "petra"
psql 
 CREATE USER tom WITH PASSWORD 'myPassword';
nant createSQLStatements
nant recreateDatabase
nant resetDatabase

Some notes

  • drop database but tables are still there when creating the database again: [1]; reason: tables are in template1 db, and that is used as a template for creating the new database
  • drop all tables in db: DROP SCHEMA public CASCADE; [2]