Code

postrr.sql: Added 'postrr.rrarchives' table.
authorSebastian Harl <sh@tokkee.org>
Tue, 23 Oct 2012 11:31:36 +0000 (13:31 +0200)
committerSebastian Harl <sh@tokkee.org>
Tue, 23 Oct 2012 11:31:36 +0000 (13:31 +0200)
This table will be used to store "Round Robin Archive" definitions. Each
archive has a name which may be used to identify the archive and a description
of the table(s) that store the values of the archive. Each entry specifies the
table as well as the RRTimeslice and CData columns to be used for storing the
values.

src/postrr.sql.in

index 01cd65f8a6be9b2c49339c629f6f0efcc72a6f4e..546a9dffa1b5003bf723fe6d1bac71012dca4887 100644 (file)
@@ -45,6 +45,14 @@ CREATE TABLE postrr.rrtimeslices (
        tsnum integer NOT NULL
 );
 
+CREATE TABLE postrr.rrarchives (
+       rraname text NOT NULL,
+       tbl name NOT NULL,
+       tscol name NOT NULL,
+       vcol name NOT NULL,
+       UNIQUE (rraname, tbl, tscol, vcol)
+);
+
 CREATE OR REPLACE FUNCTION PostRR_Version()
        RETURNS cstring
        AS 'postrr-@POSTRR_MAJOR_VERSION@.@POSTRR_MINOR_VERSION@', 'postrr_version'