PostgreSQL

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Created page with " This module is used to make the connection between yate and a PostgreSQL database. ===Configuration=== pgsqldb.conf [general] ; This section is special - holds settings ...")
 
(Configuration)
Line 50: Line 50:
 
  ; password: string: Password to authenticate the user to the database server
 
  ; password: string: Password to authenticate the user to the database server
 
  ;password=
 
  ;password=
 +
 +
 +
Example of configuration pgsqldb.conf:
 +
 +
[yateadmin]
 +
host=localhost
 +
database=yateadmin
 +
user=postgres
 +
password=yate_admin
 +
 +
This is where a new connection is made.<br>
 +
You can have multiple connections to different databases.<br>
 +
The name between [] will be used in other configuration files to set the used account.<br>
 +
Example: in register.conf you will have in the [default] section : account=yateadmin

Revision as of 15:49, 17 October 2012

This module is used to make the connection between yate and a PostgreSQL database.

Configuration

pgsqldb.conf

[general]
; This section is special - holds settings common to all connections

; priority: int: Handler priority
;priority=100
 

; Each other section in this file describes a database connection

;[default]
; The section name is used as the database connection name

; autostart: bool: Automatically initiate the connection on startup
;autostart=yes

; timeout: int: Query timeout in milliseconds
;timeout=10000

; retry: int: How many times to retry the connection or query
;retry=5

; encoding: string: Character set encoding used to communicate with the server
;  If not set will match the encoding of server side database
;encoding=

; connection: string: Ready-built client connection string for PQconnectStart
;  If this is not set the string is built from the following pieces
;  Take care if you set this - it will override anything that follows
 ;connection=

; host: string: PostgreSQL server to connect to
;host=localhost

; port: int: Port on which the server is listening for connections
;port=5432

; database: string: Name of the database to use in queries
;database=yate

; user: string: Username to use to access the database
;user=postgres

; password: string: Password to authenticate the user to the database server
;password=


Example of configuration pgsqldb.conf:

[yateadmin]
host=localhost
database=yateadmin
user=postgres
password=yate_admin

This is where a new connection is made.
You can have multiple connections to different databases.
The name between [] will be used in other configuration files to set the used account.
Example: in register.conf you will have in the [default] section : account=yateadmin

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers