Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SpectrumIM/spectrum2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDaniel Henninger <daniel@vorpalcloud.org>2013-01-11 19:16:32 +0400
committerDaniel Henninger <daniel@vorpalcloud.org>2013-01-11 19:16:32 +0400
commit6334c256f4fde314db168b4a88d1634da6a5a291 (patch)
treec00a116b089e6709a48310d5f6ccc31d37026ca3 /docs
parent14952d135082fcfb27dc0271f15890c35588d9c0 (diff)
Fixed up postgres support, needs testing both for compiling and functionality.
Diffstat (limited to 'docs')
-rw-r--r--docs/guide/postgresql.textile21
1 files changed, 19 insertions, 2 deletions
diff --git a/docs/guide/postgresql.textile b/docs/guide/postgresql.textile
index 85d27c0c..a8f5aa1a 100644
--- a/docs/guide/postgresql.textile
+++ b/docs/guide/postgresql.textile
@@ -1,16 +1,33 @@
h2. 1. Editing the configuration file
-To configure Spectrum 2 to use PostgreSQL database, you have to edit following options in database section:
+To configure Spectrum 2 to use PostgreSQL database, you have to edit some or more of the following options in database section. Please note that connectionstring overrides everything else (aside from type).
|_. Section |_. Key |_. Type |_. Change to value |_. Description |
| database| type | string | pqxx | Database type - "none", "mysql", "sqlite3", "pqxx". |
| database| database | string | Name of the already create empty database | Database used to store data. |
| database| server | string | Database server | Database server. |
+| database| port | string | Database port | Database port. |
| database| user | string | PostgreSQL user. | PostgreSQL user. |
| database| password | string | PostgreSQL Password. | PostgreSQL Password. |
| database| prefix | string | | Prefix of tables in database. |
+| database| connectionstring | string | Postgres connection string | If you set this, it will ignore all other options above aside from type and prefix. This allows you to set any typical postgres connection string option, separated by spaces (no semicolons). |
h2. 2. Creating the database
-Spectrum 2 will create the database on the first execution. Once the database is created, you can remove the CREATE TABLE permissions to the PostgreSQL database user you use to connect the SQL. \ No newline at end of file
+Spectrum 2 will create the database on the first execution. Once the database is created, you can remove the CREATE TABLE permissions to the PostgreSQL database user you use to connect the SQL.
+
+h2. 3. Some examples
+
+Using connectionstring:
+[database]
+type=pqxx
+connectionstring=host=localhost database=spectrum2 user=myuser password=whatever
+
+Using traditional options:
+[database]
+type=pqxx
+server=localhost
+database=spectrum2
+user=myuser
+password=whatever