]> de.git.xonotic.org Git - xonotic/xonstatdb.git/blob - README
Make schema creation clear. Create pgplsql language.
[xonotic/xonstatdb.git] / README
1 This is the source for xonstatdb, the Xonotic Statistics database.
2 All code herein is intended for the PostgreSQL database management server.
3
4 To build, first create the user that will own all of the objects in the 
5 database. You must run this as an administrator user in your cluster.
6 See your operating system's guidelines for how this is set up on 
7 your system:
8     
9     create user xonstat with password 'xonstat';
10
11     *Note: please change this password
12
13 Next, create the database itself:
14
15     CREATE DATABASE xonstatdb
16       WITH ENCODING='UTF8'
17         OWNER=xonstat
18         CONNECTION LIMIT=-1;
19
20 Next, log into the newly created database using the user account
21 you just created:
22
23     psql -U xonstat xonstatdb
24
25 Create the schema in which all of the xonstat tables will reside:
26
27     CREATE SCHEMA xonstat
28        AUTHORIZATION xonstat;
29
30 Create the pgplsql language:
31
32     CREATE LANGUAGE pgplsql;
33
34 Back in the command shell, navigate to the 'build' directory. 
35 Log into the database as the admin user created above and issue 
36 the following to build the initial tables:
37
38     \i build/build_full.sql
39
40     *Note: You will see a lot of NOTICE messages. This is normal.