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