[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[2484] trunk/sql/modules/Settings.sql



Revision: 2484
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2484&view=rev
Author:   einhverfr
Date:     2009-03-11 16:25:38 +0000 (Wed, 11 Mar 2009)

Log Message:
-----------
Adding function to get all currencies

Modified Paths:
--------------
    trunk/sql/modules/Settings.sql

Modified: trunk/sql/modules/Settings.sql
===================================================================
--- trunk/sql/modules/Settings.sql	2009-03-10 17:29:07 UTC (rev 2483)
+++ trunk/sql/modules/Settings.sql	2009-03-11 16:25:38 UTC (rev 2484)
@@ -69,6 +69,12 @@
 END;
 $$ LANGUAGE PLPGSQL;
 
+CREATE OR REPLACE FUNCTION setting__get_currencies() RETURNS text[]
+AS
+$$
+SELECT string_to_array(value, ':') from defaults where setting_key = 'curr';
+$$ LANGUAGE SQL;
 -- Table schema defaults
 
 ALTER TABLE entity ALTER control_code SET default setting_increment('entity_control');
+


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.