Changeset 176
- Timestamp:
- 03/01/05 13:31:45 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/ipdb.psql
r175 r176 1 --2 -- Selected TOC Entries:3 --4 1 \connect - postgres 5 2 6 -- 7 -- TOC Entry ID 22 (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 23 (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 -- 3 \connect ipdb ipdb 29 4 30 5 CREATE TABLE "customers" ( … … 43 18 ); 44 19 45 --46 -- TOC Entry ID 3 (OID 25854)47 --48 -- Name: customers Type: ACL Owner:49 --50 51 20 REVOKE ALL on "customers" from PUBLIC; 52 21 GRANT ALL on "customers" to "kdeugau"; 53 22 GRANT ALL on "customers" to "ipdb"; 54 23 55 --56 -- TOC Entry ID 4 (OID 25872)57 --58 -- Name: masterblocks Type: TABLE Owner: ipdb59 --60 61 24 CREATE TABLE "masterblocks" ( 62 "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL, 63 Constraint "masterblocks_pkey" Primary Key ("cidr") 25 "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY 64 26 ); 65 66 --67 -- TOC Entry ID 5 (OID 25872)68 --69 -- Name: masterblocks Type: ACL Owner:70 --71 27 72 28 REVOKE ALL on "masterblocks" from PUBLIC; … … 74 30 GRANT ALL on "masterblocks" to "ipdb"; 75 31 76 --77 -- TOC Entry ID 6 (OID 25875)78 --79 -- Name: routed Type: TABLE Owner: ipdb80 --81 82 32 CREATE TABLE "routed" ( 83 "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL ,33 "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY, 84 34 "maskbits" integer DEFAULT 128, 85 "city" character varying(30) DEFAULT '', 86 Constraint "routed_pkey" Primary Key ("cidr") 35 "city" character varying(30) DEFAULT '' 87 36 ); 88 89 --90 -- TOC Entry ID 7 (OID 25875)91 --92 -- Name: routed Type: ACL Owner:93 --94 37 95 38 REVOKE ALL on "routed" from PUBLIC; … … 97 40 GRANT ALL on "routed" to "ipdb"; 98 41 99 --100 -- TOC Entry ID 8 (OID 31131)101 --102 -- Name: temp Type: TABLE Owner: ipdb103 --104 105 42 CREATE TABLE "temp" ( 106 43 "ofs" integer 107 44 ); 108 109 --110 -- TOC Entry ID 9 (OID 31131)111 --112 -- Name: temp Type: ACL Owner:113 --114 45 115 46 REVOKE ALL on "temp" from PUBLIC; … … 117 48 GRANT ALL on "temp" to "ipdb"; 118 49 119 --120 -- TOC Entry ID 10 (OID 73917)121 --122 -- Name: searchme Type: VIEW Owner: ipdb123 --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.type, 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: ipdb141 --142 143 50 CREATE TABLE "freeblocks" ( 144 "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL ,51 "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY 145 52 "maskbits" integer DEFAULT 128, 146 53 "city" character varying(30) DEFAULT '', 147 "routed" character(1) DEFAULT 'n', 148 Constraint "freeblocks_pkey" Primary Key ("cidr") 54 "routed" character(1) DEFAULT 'n' 149 55 ); 150 151 --152 -- TOC Entry ID 13 (OID 91065)153 --154 -- Name: freeblocks Type: ACL Owner:155 --156 56 157 57 REVOKE ALL on "freeblocks" from PUBLIC; … … 159 59 GRANT ALL on "freeblocks" to "ipdb"; 160 60 161 --162 -- TOC Entry ID 14 (OID 92444)163 --164 -- Name: poolips Type: TABLE Owner: ipdb165 --166 167 61 CREATE TABLE "poolips" ( 168 62 "pool" cidr DEFAULT '255.255.255.255/32' NOT NULL, 169 "ip" cidr DEFAULT '255.255.255.255/32' NOT NULL ,63 "ip" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY, 170 64 "custid" character varying(16) DEFAULT '' NOT NULL, 171 65 "city" character varying(30) DEFAULT '' NOT NULL, … … 176 70 "circuitid" character varying(128) DEFAULT '' NOT NULL, 177 71 "newcustid" integer, 178 CHECK (((available = 'y'::bpchar) OR (available = 'n'::bpchar))), 179 Constraint "poolips_pkey" Primary Key ("ip") 72 CHECK (((available = 'y'::bpchar) OR (available = 'n'::bpchar))) 180 73 ); 181 182 --183 -- TOC Entry ID 15 (OID 92444)184 --185 -- Name: poolips Type: ACL Owner:186 --187 74 188 75 REVOKE ALL on "poolips" from PUBLIC; … … 190 77 GRANT ALL on "poolips" to "ipdb"; 191 78 192 --193 -- TOC Entry ID 16 (OID 92725)194 --195 -- Name: allocations Type: TABLE Owner: ipdb196 --197 198 79 CREATE TABLE "allocations" ( 199 "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL ,80 "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY, 200 81 "custid" character varying(16) DEFAULT '', 201 82 "type" character(2) DEFAULT '', … … 205 86 "maskbits" integer DEFAULT 128, 206 87 "circuitid" character varying(128) DEFAULT '', 207 "newcustid" integer, 208 Constraint "allocations_pkey" Primary Key ("cidr") 88 "newcustid" integer 209 89 ); 210 211 --212 -- TOC Entry ID 17 (OID 92725)213 --214 -- Name: allocations Type: ACL Owner:215 --216 90 217 91 REVOKE ALL on "allocations" from PUBLIC; … … 219 93 GRANT ALL on "allocations" to "ipdb"; 220 94 221 -- 222 -- TOC Entry ID 18 (OID 92809) 223 -- 224 -- Name: alloctypes Type: TABLE Owner: ipdb 225 -- 95 CREATE VIEW "searchme" as SELECT allocations.cidr, allocations.custid, allocations."type", allocations.city, allocations.description FROM allocations UNION SELECT poolips.ip, poolips.custid, poolips.type, poolips.city, poolips.description FROM poolips; 96 97 REVOKE ALL on "searchme" from PUBLIC; 98 GRANT ALL on "searchme" to "kdeugau"; 99 GRANT ALL on "searchme" to "ipdb"; 226 100 227 101 CREATE TABLE "alloctypes" ( 228 "type" character(2) DEFAULT '' NOT NULL ,102 "type" character(2) DEFAULT '' NOT NULL PRIMARY KEY, 229 103 "listname" character varying(40) DEFAULT '', 230 104 "dispname" character varying(40) DEFAULT '', 231 105 "listorder" integer DEFAULT 0, 232 "def_custid" character varying(16) DEFAULT '', 233 Constraint "alloctypes_pkey" Primary Key ("type") 106 "def_custid" character varying(16) DEFAULT '' 234 107 ); 235 236 --237 -- TOC Entry ID 19 (OID 92809)238 --239 -- Name: alloctypes Type: ACL Owner:240 --241 108 242 109 REVOKE ALL on "alloctypes" from PUBLIC; … … 244 111 GRANT ALL on "alloctypes" to "ipdb"; 245 112 246 --247 -- TOC Entry ID 20 (OID 93964)248 --249 -- Name: cities Type: TABLE Owner: ipdb250 --251 252 113 CREATE TABLE "cities" ( 253 "city" character varying(30) DEFAULT '' NOT NULL ,114 "city" character varying(30) DEFAULT '' NOT NULL PRIMARY KEY, 254 115 "routing" character(1) DEFAULT 'n' NOT NULL, 255 Constraint "cities_pkey" Primary Key ("city")256 116 ); 257 258 --259 -- TOC Entry ID 21 (OID 93964)260 --261 -- Name: cities Type: ACL Owner:262 --263 117 264 118 REVOKE ALL on "cities" from PUBLIC;
Note:
See TracChangeset
for help on using the changeset viewer.