File: solarpowerlog-postgresql.conf

package info (click to toggle)
solarpowerlog 0.26-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,724 kB
  • sloc: cpp: 11,856; ansic: 1,044; php: 728; sh: 188; xml: 166; makefile: 166
file content (55 lines) | stat: -rw-r--r-- 1,472 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# This snippet explains all options for the PostgreSQL database backend.

# solarpowerlog uses CppDB as its database abstraction library.
# To get additional hints about configuration options,
# see http://cppcms.com/sql/cppdb/backendref.html
# and http://cppcms.com/sql/cppdb/connstr.html.

# NOTE: This snippet is designed to be included in the logger section.

# WARNING: I did not test this snippet -- it shows only the configuration options
# I coded into solarpowerlog. Feedback if it works or not is appreciated.

# Example use:

/*
logger:
{
    loggers = (
        {
            # We want to have a DBWriter:
            type = "DBWriter";
            # This DB Writer is known as (required)
            name = "DBWriter_tst";
            # It is of type
            # And gets its data from
            datasource = "Simulator";

            @include "solarpowerlog-postgresql.conf"

            (...)
*/

# Ok here we go...

    ### PostgreSQL ###
    # Backend documentation: http://cppcms.com/sql/cppdb/postgresql.html
    db_type="postgresql";

    # hostname of the server (default is localhost)
    db_host="localhost"

    # Port to access the server
    db_port="5432";

    # user to connect
    db_user="dbuser";

    # password to connect to the server
    db_password="very\'secret";

    # database to be used
    db_database="solarpowerlog";

    # Additional parameters (see CppDB's postgresql backend reference)
    #db_cppdb_options="@blob=lo";