1 | --
|
---|
2 | -- Selected TOC Entries:
|
---|
3 | --
|
---|
4 | \connect - postgres
|
---|
5 |
|
---|
6 | --
|
---|
7 | -- TOC Entry ID 18 (OID 16556)
|
---|
8 | --
|
---|
9 | -- Name: "plpgsql_call_handler" () Type: FUNCTION Owner: postgres
|
---|
10 | --
|
---|
11 |
|
---|
12 | CREATE FUNCTION "plpgsql_call_handler" () RETURNS opaque AS '$libdir/plpgsql', 'plpgsql_call_handler' LANGUAGE 'C';
|
---|
13 |
|
---|
14 | --
|
---|
15 | -- TOC Entry ID 19 (OID 16557)
|
---|
16 | --
|
---|
17 | -- Name: plpgsql Type: PROCEDURAL LANGUAGE Owner:
|
---|
18 | --
|
---|
19 |
|
---|
20 | CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER "plpgsql_call_handler" LANCOMPILER '';
|
---|
21 |
|
---|
22 | \connect - ipdb
|
---|
23 |
|
---|
24 | --
|
---|
25 | -- TOC Entry ID 2 (OID 25854)
|
---|
26 | --
|
---|
27 | -- Name: customers Type: TABLE Owner: ipdb
|
---|
28 | --
|
---|
29 |
|
---|
30 | CREATE TABLE "customers" (
|
---|
31 | "custid" character varying(16) DEFAULT '' NOT NULL,
|
---|
32 | "name" character varying(64),
|
---|
33 | "street" character varying(25),
|
---|
34 | "street2" character varying(25),
|
---|
35 | "city" character varying(30),
|
---|
36 | "province" character(2),
|
---|
37 | "pocode" character varying(7),
|
---|
38 | "phone" character varying(15),
|
---|
39 | "abuse" character varying(50),
|
---|
40 | "def_rdns" character varying(40),
|
---|
41 | "description" text,
|
---|
42 | Constraint "customers_pkey" Primary Key ("custid")
|
---|
43 | );
|
---|
44 |
|
---|
45 | --
|
---|
46 | -- TOC Entry ID 3 (OID 25854)
|
---|
47 | --
|
---|
48 | -- Name: customers Type: ACL Owner:
|
---|
49 | --
|
---|
50 |
|
---|
51 | REVOKE ALL on "customers" from PUBLIC;
|
---|
52 | GRANT ALL on "customers" to "kdeugau";
|
---|
53 | GRANT ALL on "customers" to "ipdb";
|
---|
54 |
|
---|
55 | --
|
---|
56 | -- TOC Entry ID 4 (OID 25872)
|
---|
57 | --
|
---|
58 | -- Name: masterblocks Type: TABLE Owner: ipdb
|
---|
59 | --
|
---|
60 |
|
---|
61 | CREATE TABLE "masterblocks" (
|
---|
62 | "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL,
|
---|
63 | Constraint "masterblocks_pkey" Primary Key ("cidr")
|
---|
64 | );
|
---|
65 |
|
---|
66 | --
|
---|
67 | -- TOC Entry ID 5 (OID 25872)
|
---|
68 | --
|
---|
69 | -- Name: masterblocks Type: ACL Owner:
|
---|
70 | --
|
---|
71 |
|
---|
72 | REVOKE ALL on "masterblocks" from PUBLIC;
|
---|
73 | GRANT ALL on "masterblocks" to "kdeugau";
|
---|
74 | GRANT ALL on "masterblocks" to "ipdb";
|
---|
75 |
|
---|
76 | --
|
---|
77 | -- TOC Entry ID 6 (OID 25875)
|
---|
78 | --
|
---|
79 | -- Name: routed Type: TABLE Owner: ipdb
|
---|
80 | --
|
---|
81 |
|
---|
82 | CREATE TABLE "routed" (
|
---|
83 | "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL,
|
---|
84 | "maskbits" integer DEFAULT 128,
|
---|
85 | "city" character varying(30) DEFAULT '',
|
---|
86 | Constraint "routed_pkey" Primary Key ("cidr")
|
---|
87 | );
|
---|
88 |
|
---|
89 | --
|
---|
90 | -- TOC Entry ID 7 (OID 25875)
|
---|
91 | --
|
---|
92 | -- Name: routed Type: ACL Owner:
|
---|
93 | --
|
---|
94 |
|
---|
95 | REVOKE ALL on "routed" from PUBLIC;
|
---|
96 | GRANT ALL on "routed" to "kdeugau";
|
---|
97 | GRANT ALL on "routed" to "ipdb";
|
---|
98 |
|
---|
99 | --
|
---|
100 | -- TOC Entry ID 8 (OID 31131)
|
---|
101 | --
|
---|
102 | -- Name: temp Type: TABLE Owner: ipdb
|
---|
103 | --
|
---|
104 |
|
---|
105 | CREATE TABLE "temp" (
|
---|
106 | "ofs" integer
|
---|
107 | );
|
---|
108 |
|
---|
109 | --
|
---|
110 | -- TOC Entry ID 9 (OID 31131)
|
---|
111 | --
|
---|
112 | -- Name: temp Type: ACL Owner:
|
---|
113 | --
|
---|
114 |
|
---|
115 | REVOKE ALL on "temp" from PUBLIC;
|
---|
116 | GRANT ALL on "temp" to "kdeugau";
|
---|
117 | GRANT ALL on "temp" to "ipdb";
|
---|
118 |
|
---|
119 | --
|
---|
120 | -- TOC Entry ID 10 (OID 73917)
|
---|
121 | --
|
---|
122 | -- Name: searchme Type: VIEW Owner: ipdb
|
---|
123 | --
|
---|
124 |
|
---|
125 | CREATE VIEW "searchme" as SELECT allocations.cidr, allocations.custid, allocations."type", allocations.city, allocations.description FROM allocations UNION SELECT poolips.ip, poolips.custid, poolips.ptype, poolips.city, poolips.description FROM poolips;
|
---|
126 |
|
---|
127 | --
|
---|
128 | -- TOC Entry ID 11 (OID 73917)
|
---|
129 | --
|
---|
130 | -- Name: searchme Type: ACL Owner:
|
---|
131 | --
|
---|
132 |
|
---|
133 | REVOKE ALL on "searchme" from PUBLIC;
|
---|
134 | GRANT ALL on "searchme" to "kdeugau";
|
---|
135 | GRANT ALL on "searchme" to "ipdb";
|
---|
136 |
|
---|
137 | --
|
---|
138 | -- TOC Entry ID 12 (OID 91065)
|
---|
139 | --
|
---|
140 | -- Name: freeblocks Type: TABLE Owner: ipdb
|
---|
141 | --
|
---|
142 |
|
---|
143 | CREATE TABLE "freeblocks" (
|
---|
144 | "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL,
|
---|
145 | "maskbits" integer DEFAULT 128,
|
---|
146 | "city" character varying(30) DEFAULT '',
|
---|
147 | "routed" character(1) DEFAULT 'n',
|
---|
148 | Constraint "freeblocks_pkey" Primary Key ("cidr")
|
---|
149 | );
|
---|
150 |
|
---|
151 | --
|
---|
152 | -- TOC Entry ID 13 (OID 91065)
|
---|
153 | --
|
---|
154 | -- Name: freeblocks Type: ACL Owner:
|
---|
155 | --
|
---|
156 |
|
---|
157 | REVOKE ALL on "freeblocks" from PUBLIC;
|
---|
158 | GRANT ALL on "freeblocks" to "kdeugau";
|
---|
159 | GRANT ALL on "freeblocks" to "ipdb";
|
---|
160 |
|
---|
161 | --
|
---|
162 | -- TOC Entry ID 14 (OID 92444)
|
---|
163 | --
|
---|
164 | -- Name: poolips Type: TABLE Owner: ipdb
|
---|
165 | --
|
---|
166 |
|
---|
167 | CREATE TABLE "poolips" (
|
---|
168 | "pool" cidr DEFAULT '255.255.255.255/32' NOT NULL,
|
---|
169 | "ip" cidr DEFAULT '255.255.255.255/32' NOT NULL,
|
---|
170 | "custid" character varying(16) DEFAULT '' NOT NULL,
|
---|
171 | "city" character varying(30) DEFAULT '',
|
---|
172 | "ptype" character(1) DEFAULT 'c' NOT NULL,
|
---|
173 | "available" character(1) DEFAULT 'y',
|
---|
174 | "notes" text DEFAULT '',
|
---|
175 | "description" character varying(64) DEFAULT '',
|
---|
176 | "circuitid" character varying(128) DEFAULT '',
|
---|
177 | CHECK (((available = 'y'::bpchar) OR (available = 'n'::bpchar))),
|
---|
178 | Constraint "poolips_pkey" Primary Key ("ip")
|
---|
179 | );
|
---|
180 |
|
---|
181 | --
|
---|
182 | -- TOC Entry ID 15 (OID 92444)
|
---|
183 | --
|
---|
184 | -- Name: poolips Type: ACL Owner:
|
---|
185 | --
|
---|
186 |
|
---|
187 | REVOKE ALL on "poolips" from PUBLIC;
|
---|
188 | GRANT ALL on "poolips" to "kdeugau";
|
---|
189 | GRANT ALL on "poolips" to "ipdb";
|
---|
190 |
|
---|
191 | --
|
---|
192 | -- TOC Entry ID 16 (OID 92725)
|
---|
193 | --
|
---|
194 | -- Name: allocations Type: TABLE Owner: ipdb
|
---|
195 | --
|
---|
196 |
|
---|
197 | CREATE TABLE "allocations" (
|
---|
198 | "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL,
|
---|
199 | "custid" character varying(16) DEFAULT '',
|
---|
200 | "type" character(2) DEFAULT '',
|
---|
201 | "city" character varying(30) DEFAULT '',
|
---|
202 | "description" character varying(64) DEFAULT '',
|
---|
203 | "notes" text DEFAULT '',
|
---|
204 | "maskbits" integer DEFAULT 128,
|
---|
205 | "circuitid" character varying(128) DEFAULT '',
|
---|
206 | Constraint "allocations_pkey" Primary Key ("cidr")
|
---|
207 | );
|
---|
208 |
|
---|
209 | --
|
---|
210 | -- TOC Entry ID 17 (OID 92725)
|
---|
211 | --
|
---|
212 | -- Name: allocations Type: ACL Owner:
|
---|
213 | --
|
---|
214 |
|
---|
215 | REVOKE ALL on "allocations" from PUBLIC;
|
---|
216 | GRANT ALL on "allocations" to "kdeugau";
|
---|
217 | GRANT ALL on "allocations" to "ipdb";
|
---|
218 |
|
---|