root/sql/tables/noit.check_archive.sql

Revision 635ff12b1629be1d08ee18e49f204c9921a0a939, 1.3 kB (checked in by Robert Treat <robert@omniti.com>, 4 years ago)

fix up check_archive trigger function

  • Property mode set to 100644
Line 
1 -- formerly loading_dock_check_s
2
3 --
4 -- PostgreSQL database dump
5 --
6
7 SET client_encoding = 'UTF8';
8 SET standard_conforming_strings = off;
9 SET check_function_bodies = false;
10 SET client_min_messages = warning;
11 SET escape_string_warning = off;
12
13 SET search_path = noit, pg_catalog;
14
15 SET default_tablespace = '';
16
17 SET default_with_oids = false;
18
19 --
20 -- Name: check_archive; Type: TABLE; Schema: noit; Owner: reconnoiter; Tablespace:
21 --
22
23 CREATE TABLE check_archive (
24     sid integer NOT NULL,
25     remote_address inet,
26     whence timestamp with time zone NOT NULL,
27     id uuid NOT NULL,
28     target text NOT NULL,
29     module text NOT NULL,
30     name text NOT NULL
31 );
32
33
34 ALTER TABLE noit.check_archive OWNER TO reconnoiter;
35
36 --
37 -- Name: check_archive_pkey; Type: CONSTRAINT; Schema: noit; Owner: reconnoiter; Tablespace:
38 --
39
40 ALTER TABLE ONLY check_archive
41     ADD CONSTRAINT check_archive_pkey PRIMARY KEY (sid, id, whence);
42
43
44 CREATE TRIGGER update_check_currently
45     AFTER INSERT ON check_archive
46     FOR EACH ROW
47     EXECUTE PROCEDURE update_check_currently();
48
49 --
50 -- Name: check_archive; Type: ACL; Schema: noit; Owner: reconnoiter
51 --
52
53 REVOKE ALL ON TABLE check_archive FROM PUBLIC;
54 GRANT SELECT,INSERT ON TABLE check_archive TO stratcon;
55 GRANT SELECT ON TABLE check_archive TO prism;
56
57
58 --
59 -- PostgreSQL database dump complete
60 --
61
Note: See TracBrowser for help on using the browser.