Moved unused and unneeded stored procedure to a separate file
authorpnixon <pnixon>
Mon, 16 Jul 2007 11:22:49 +0000 (11:22 +0000)
committerpnixon <pnixon>
Mon, 16 Jul 2007 11:22:49 +0000 (11:22 +0000)
doc/examples/postgresql.sql
doc/examples/postgresql.sql.extra [new file with mode: 0644]

index 4cf1133..bd897cd 100644 (file)
@@ -220,28 +220,3 @@ CREATE TABLE radippool (
 --     Vendor          VARCHAR(32)
 -- );
 
-/*
- * Note: (pnixon: 2003-12-10) The following function should not be required
- * if you use the PG specific queries in raddb/postgresql.conf
- *
- * Common utility function for date calculations. This is used in our
- * alternative account stop query to calculate the start of a session.
- *
- * This function is Copyright 2001 by Mark Steele (msteele@inet-interactif.com)
- *
- * Please note that this requires the plpgsql to be available in your
- * radius database. If it is not available you can register it with
- * postgres by running this command:
- *
- *   createlang plpgsql <databasename>
- */
-CREATE FUNCTION DATE_SUB(date,int4,text) RETURNS DATE AS '
-DECLARE
-        var1 date;
-        var2 text;
-BEGIN
-        var2 = $2 || '' '' || $3;
-        SELECT INTO var1
-                to_date($1 - var2::interval, ''YYYY-MM-DD'');
-RETURN var1;
-END;' LANGUAGE 'plpgsql';
diff --git a/doc/examples/postgresql.sql.extra b/doc/examples/postgresql.sql.extra
new file mode 100644 (file)
index 0000000..e1e044f
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * $Id$
+ *
+ * Postgresql extra schema for FreeRADIUS
+ *
+ * Note: (pnixon: 2003-12-10) The following function should not be required
+ * if you use the PG specific queries in raddb/postgresql.conf
+ *
+ * Common utility function for date calculations. This is used in our
+ * alternative account stop query to calculate the start of a session.
+ *
+ * This function is Copyright 2001 by Mark Steele (msteele@inet-interactif.com)
+ *
+ * Please note that this requires the plpgsql to be available in your
+ * radius database. If it is not available you can register it with
+ * postgres by running this command:
+ *
+ *   createlang plpgsql <databasename>
+ */
+CREATE FUNCTION DATE_SUB(date,int4,text) RETURNS DATE AS '
+DECLARE
+        var1 date;
+        var2 text;
+BEGIN
+        var2 = $2 || '' '' || $3;
+        SELECT INTO var1
+                to_date($1 - var2::interval, ''YYYY-MM-DD'');
+RETURN var1;
+END;' LANGUAGE 'plpgsql';