PostgreSQL Server installation and configuration¶
Installing PostgreSQL Server¶
The PostgreSQL download page lists the available installation methods. Choose the one that suits your needs best.
Example on Ubuntu¶
On Ubuntu, install the postgresql package:
sudo apt-get install postgresql
Setup a PostgreSQL user¶
When the installations of the required software are done, you have to create a PostgreSQL user. OpenERP will use this user to connect to PostgreSQL.
Add a user¶
The default superuser for PostgreSQL is called postgres. We will use it below as an example. If you wish to use it as well, you may need to login as this user first.
johndoe$ sudo su - postgres password: XXXXXXXXXX postgres$ createuser --createdb --username postgres --no-createrole --pwprompt openuser Enter password for new role: XXXXXXXXXX Enter it again: XXXXXXXXXX Shall the new role be a superuser? (y/n) y CREATE ROLE postgres$
, assuming you want to create the openuser role.
--createdb : the new user will be able to create new databases
--username postgres : createuser will use the postgres user (superuser)
--no-createrole : the new user will not be able to create new users
--pwprompt : createuser will ask you the new user's password
openuser the new user's name
You can now start the OpenERP Server. You will probably need to modify the OpenERP configuration file to your need.
You can find information on configuration files in the Developer Book, section Configuration
Case insensitive searches issue¶
For an installation which need full UTF8 character support consider to use postgres >= 8.2.x. Prior to this OpenERP search will eventually not return the expected results for case insensitive searches, which are used for searching partners, products etc.
SELECT 'x' FROM my_table WHERE 'bét' ilike 'BÉT' --matches only in 8.2.x