1 This is the source for xonstatdb, the Xonotic Statistics database.
2 All code herein is intended for the PostgreSQL database management server.
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
9 create user xonstat with password 'xonstat';
11 *Note: please change this password
13 Next, create the database itself:
15 CREATE DATABASE xonstatdb
20 Next, log into the newly created database using the user account
23 psql -U xonstat xonstatdb
25 Create the schema in which all of the xonstat tables will reside:
28 AUTHORIZATION xonstat;
30 Create the pgplsql language:
32 CREATE LANGUAGE plpgsql;
34 Back in the command shell, navigate to the root directory.
35 Log into the database as the admin user created above and issue
36 the following to build the initial tables:
38 \i build/build_full.sql
40 *Note: You will see a lot of NOTICE messages. This is normal.