aboutsummaryrefslogtreecommitdiffstats
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/dawn.sql10
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql
index da6dd7b4..c19c77fb 100644
--- a/sql/dawn.sql
+++ b/sql/dawn.sql
@@ -967,10 +967,16 @@ FROM temp;
END
$$ LANGUAGE plpgsql;
+CREATE OR REPLACE function imm_date(p_date date)
+RETURNS date AS $$
+from dates import imm_date
+return imm_date(p_date)
+$$ LANGUAGE plpython2u;
+
CREATE OR REPLACE function days_accrued(p_date date)
RETURNS integer AS $$
-FROM dates import days_accrued
-RETURN days_accrued(p_date)
+from dates import days_accrued
+return days_accrued(p_date)
$$ LANGUAGE plpython2u;
CREATE MATERIALIZED VIEW factors_history AS