summaryrefslogtreecommitdiffstats
path: root/raddb/mods-config/sql/ippool/postgresql/schema.sql
diff options
context:
space:
mode:
Diffstat (limited to 'raddb/mods-config/sql/ippool/postgresql/schema.sql')
-rw-r--r--raddb/mods-config/sql/ippool/postgresql/schema.sql22
1 files changed, 22 insertions, 0 deletions
diff --git a/raddb/mods-config/sql/ippool/postgresql/schema.sql b/raddb/mods-config/sql/ippool/postgresql/schema.sql
new file mode 100644
index 0000000..1ef57b7
--- /dev/null
+++ b/raddb/mods-config/sql/ippool/postgresql/schema.sql
@@ -0,0 +1,22 @@
+--
+-- Table structure for table 'radippool'
+--
+-- See also "procedure.sql" in this directory for additional
+-- indices and a stored procedure that is much faster.
+--
+
+CREATE TABLE radippool (
+ id BIGSERIAL PRIMARY KEY,
+ pool_name text NOT NULL,
+ FramedIPAddress INET NOT NULL,
+ NASIPAddress text NOT NULL default '',
+ pool_key text NOT NULL default '',
+ CalledStationId text NOT NULL default '',
+ CallingStationId text NOT NULL default ''::text,
+ expiry_time TIMESTAMP(0) without time zone NOT NULL default NOW(),
+ username text DEFAULT ''::text
+);
+
+CREATE INDEX radippool_poolname_expire ON radippool USING btree (pool_name, expiry_time);
+CREATE INDEX radippool_framedipaddress ON radippool USING btree (framedipaddress);
+CREATE INDEX radippool_nasip_poolkey_ipaddress ON radippool USING btree (nasipaddress, pool_key, framedipaddress);