removing version info from login_error page.
[squirrelmail.git] / doc / db-backend.txt
index 917a4b3796ebe558f1337cb0b077f77e13dfeb4c..33155437008ff5c9179c8b7a6d32a59e2554d771 100644 (file)
@@ -39,7 +39,7 @@ For MySQL you would normally do something like:
  # mysqladmin create squirrelmail
 
  (from the mysql client)
- mysql> GRANT select,insert,update,delete ON squirrelmail.* 
+ mysql> GRANT select,insert,update,delete ON squirrelmail.*
               TO squirreluser@localhost IDENTIFIED BY 'sqpassword';
 
 The table structure should be similar to this (for MySQL):
@@ -73,12 +73,15 @@ Next, edit your configuration so that the address book DSN (Data Source
 Name) is specified, this can be done using either conf.pl or via the
 administration plugin. The DSN should look something like:
 
- mysql://squirreluser:sqpassword@localhost/squirrelmail
+ mysql://squirreluser:sqpassword@localhost/squirrelmail or
+ pgsql://squirreluser:sqpassword@localhost/squirrelmail
 
 From now on all users' personal addressbooks will be stored in a
 database.
 
-
+Global address book uses same table format as the one used for personal
+address book. You can even use same table, if you don't have user named
+'global'.
 
 Configuring preferences in database
 -----------------------------------
@@ -97,25 +100,21 @@ The table structure should be similar to this (for MySQL):
 
 and for PostgreSQL:
 CREATE TABLE "userprefs" (
-   "user" varchar(128) NOT NULL,
+   "username" varchar(128) NOT NULL,
    "prefkey" varchar(64) NOT NULL,
    "prefval" text,
-   CONSTRAINT "userprefs_pkey" PRIMARY KEY ("prefkey", "user")
+   CONSTRAINT "userprefs_pkey" PRIMARY KEY ("prefkey", "username")
 );
 
 Next, edit your configuration so that the preferences DSN (Data Source
 Name) is specified, this can be done using either conf.pl or via the
 administration plugin. The DSN should look something like:
 
- mysql://squirreluser:sqpassword@localhost/squirrelmail
+ mysql://squirreluser:sqpassword@localhost/squirrelmail or
+ pgsql://squirreluser:sqpassword@localhost/squirrelmail
 
 From now on all users' personal preferences will be stored in a
 database.
 
 Default preferences can be set by altering the $default array in
 db_prefs.php.
-
-NB It seems that currently database backed preferences won't work under
-PostgreSQL at least due to using a column name of user and REPLACE which
-doesn't exist under PostgreSQL. This will be worked on and fixed as soon
-as possible.